#include <bits/stdc++.h>
using namespace std;
void solve(int n, long long s[], long long p[]);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    int n;
    cin >> (n);
    string str;
    vector<string> v;
    for (long long i = 0; i < n; i++) {
      cin >> (str);
      v.push_back(str);
    }
    string res = "";
    for (long long j = 0; j < v[0].size(); j++) {
      char ch = ' ';
      for (long long i = 0; i < n; i++) {
        if (ch == ' ' and v[i][j] != '?') {
          ch = v[i][j];
        }
        if (v[i][j] != '?') {
          if (v[i][j] != ch) {
            ch = '?';
            break;
          }
        }
      }
      if (ch == ' ') {
        res += 'x';
      } else {
        res += ch;
      }
    }
    cout << (res);
  }
  return 0;
}
