#include <bits/stdc++.h>
using namespace std;
const int N = 2020;
int main() {
  int n;
  cin >> n;
  vector<string> v(n);
  for (long long i = 0; i < (n); i++) cin >> v[i];
  string s;
  for (long long i = 0; i < (v[0].size()); i++) {
    int f = 0;
    char c = '?';
    for (long long j = 0; j < (n); j++) {
      if (f == 0 && v[j][i] != '?') {
        f = 1;
        c = v[j][i];
      } else if (f == 1 && v[j][i] != '?' && v[j][i] != c) {
        f = 2;
        c = '?';
        break;
      }
    }
    if (f == 0)
      s += 'a';
    else if (f == 1)
      s += c;
    else
      s += '?';
  }
  cout << s << endl;
}
