#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 1; i < n; i++) {
    string ss;
    cin >> ss;
    for (int j = 0; j < s.length(); j++)
      if (ss[j] != '?' && ss[j] != s[j])
        if (s[j] == '?')
          s[j] = ss[j];
        else
          s[j] = '!';
  }
  for (int i = 0; i < s.length(); i++)
    if (s[i] == '?')
      s[i] = 'a';
    else if (s[i] == '!')
      s[i] = '?';
  cout << s << endl;
  return 0;
}
