#include <bits/stdc++.h>
const double eps = 1e-7;
const int inf = 0x7FFFFFFF;
using namespace std;
char buf[100010];
char idx[100010], ans[100010];
int main() {
  int n, l;
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%s", buf);
    l = strlen(buf);
    if (!i) {
      for (int j = 0; j < l; j++) idx[j] = buf[j];
      continue;
    }
    for (int j = 0; j < l; j++) {
      if (buf[j] != idx[j]) {
        if (idx[j] == '?')
          idx[j] = buf[j];
        else if (buf[j] != '?')
          ans[j] = '?';
      }
    }
  }
  for (int i = 0; i < l; i++)
    if (ans[i] != '?') {
      if (idx[i] != '?')
        ans[i] = idx[i];
      else
        ans[i] = 'x';
    }
  ans[l] = 0;
  printf("%s\n", ans);
  return 0;
}
