#include <bits/stdc++.h>
using namespace std;
int n;
string s[100500];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> s[i];
  }
  int nn = s[1].size();
  string t = "";
  for (int j = 0; j < nn; j++) {
    bool ok = 0;
    char ch = '#';
    map<char, bool> m;
    m.clear();
    for (int i = 1; i <= n; i++) {
      if (s[i][j] != '?') m[s[i][j]] = 1, ch = s[i][j];
      if (m.size() > 1) {
        cout << '?';
        ok = 1;
        break;
      }
    }
    if (m.size() > 1 && !ok) {
      cout << '?';
      ok = 1;
      continue;
    }
    if (ok) continue;
    if (m.empty()) {
      for (int j = 0; j < 26; j++) {
        if (m.count(j + 'a') == 0) {
          cout << char(j + 'a');
          break;
        }
      }
    } else {
      cout << ch;
    }
  }
  return 0;
}
