#include <bits/stdc++.h>
using namespace std;
set<char> S;
int main() {
  int n;
  scanf("%d", &n);
  string s;
  vector<string> a;
  int i, j, m;
  for (i = 0; i < n; i++) {
    cin >> s;
    m = s.size();
    a.push_back(s);
  }
  string ans = "";
  for (j = 0; j < m; j++) {
    S.clear();
    int d = 0;
    char c = 'a';
    for (i = 0; i < n; i++) {
      if (a[i][j] == '?') {
        continue;
      }
      c = a[i][j];
      if (S.find(a[i][j]) == S.end()) {
        S.insert(a[i][j]);
        d++;
      }
    }
    if (d >= 2) {
      ans += '?';
    } else {
      ans += c;
    }
  }
  cout << ans;
  return 0;
}
