#include <bits/stdc++.h>
using namespace std;
const int MAXN = 107, N = 100005;
int n;
bool done[N];
string x, ans;
int main() {
  cin >> n;
  cin >> x;
  ans = x;
  for (int i = 2; i <= n; i++) {
    cin >> x;
    for (int j = 0; j < x.size(); j++) {
      if (!done[j]) {
        if (ans[j] == '?' && x[j] != ans[j]) {
          ans[j] = x[j];
        } else {
          if (ans[j] != '?' && x[j] != '?' && ans[j] != x[j]) {
            ans[j] = '?';
            done[j] = true;
          }
        }
      }
    }
  }
  for (int i = 0; i < ans.size(); i++) {
    if (ans[i] == '?' && !done[i]) {
      ans[i] = 'a';
    }
    cout << ans[i];
  }
  cout << "\n";
  return 0;
}
