#include <bits/stdc++.h>
using namespace std;
static vector<string> vc;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  int a, b;
  string str;
  char ch;
  cin >> n;
  vc.resize(n);
  for (int i = 0; i < n; ++i) cin >> vc[i];
  for (int i = 0; i < vc[0].length(); ++i) {
    a = 0;
    b = 0;
    for (int j = 0; j < n; ++j)
      if (a == 0 && vc[j][i] != '?') {
        a = 1;
        ch = vc[j][i];
      } else if (vc[j][i] != '?' && vc[j][i] != ch) {
        b = 1;
        break;
      }
    if (b)
      str.push_back('?');
    else if (!a)
      str.push_back('a');
    else
      str.push_back(ch);
  }
  cout << str << endl;
  return 0;
}
