#include <bits/stdc++.h>
using namespace std;
char buf[123456];
char result[123456];
int main() {
  int n = 0;
  scanf("%d", &n);
  int mxlen = 0;
  for (int i = 0; i < n; i++) {
    scanf("%s", buf);
    int len = strlen(buf);
    if (i == 0) {
      for (int j = 0; j < len; j++) result[j] = 'R';
    }
    for (int j = 0; j < len; j++) {
      if (buf[j] != '?') {
        if (result[j] == 'R')
          result[j] = buf[j];
        else if (result[j] != buf[j])
          result[j] = '?';
      }
    }
    mxlen = len;
  }
  for (int i = 0; i < mxlen; i++)
    if (result[i] == 'R') result[i] = 'r';
  puts(result);
  return 0;
}
