#include <bits/stdc++.h>
using namespace std;
char a[100005], ans[100005];
int main() {
  int n, m;
  cin >> n;
  while (n--) {
    cin >> a;
    m = strlen(a);
    for (int i = 0; i < m; i++) {
      if (a[i] != '?') {
        if (ans[i] == 0)
          ans[i] = a[i];
        else if (a[i] != ans[i])
          ans[i] = '?';
      }
    }
  }
  ans[m] = 0;
  for (int i = 0; i < m; i++) {
    if (ans[i] == 0) ans[i] = 'a';
  }
  cout << ans << endl;
  return 0;
}
