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