#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  int n;
  cin >> n;
  cin >> s;
  int l = s.size();
  for (int x = 1; x < n; x++) {
    cin >> t;
    for (int i = 0; i < l; i++) {
      if (s[i] == '?')
        s[i] = t[i];
      else if (t[i] != '?' && s[i] != t[i])
        s[i] = '!';
    }
  }
  for (int i = 0; i < l; i++) {
    if (s[i] == '?')
      s[i] = 'y';
    else if (s[i] == '!')
      s[i] = '?';
  }
  cout << s << endl;
}
