#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string mas[n];
  for (int i = 0; i < n; ++i) cin >> mas[i];
  string ans = mas[0];
  int len = ans.size();
  for (int i = 0; i < len; ++i) {
    bool alph[26];
    memset(alph, 0, sizeof(alph));
    int cnt = 0;
    for (int j = 0; j < n; ++j) {
      if (mas[j][i] != '?') {
        if (!alph[mas[j][i] - 'a']) cnt++;
        alph[mas[j][i] - 'a'] = true;
      }
    }
    if (cnt == 1) {
      for (int j = 0;; ++j) {
        if (alph[j]) {
          ans[i] = char(j + 'a');
          break;
        }
      }
      continue;
    }
    if (!cnt) {
      ans[i] = 'a';
      continue;
    }
    ans[i] = '?';
  }
  cout << ans << endl;
  return 0;
}
