#include <bits/stdc++.h>
using namespace std;
bool vis[200000];
void resolve() {
  char ck[100005];
  memset(ck, '#', sizeof(ck));
  int n, ln;
  cin >> n;
  for (int i = 0; i < n; i++) {
    char s[100005];
    cin >> s;
    ln = strlen(s);
    for (int i = 0; i < ln; i++) {
      if (s[i] != '?') {
        if (ck[i] == '#')
          ck[i] = s[i];
        else if (ck[i] != s[i])
          ck[i] = '?';
      }
    }
  }
  for (int i = 0; i < ln; i++) {
    if (ck[i] == '#')
      cout << 'z';
    else
      cout << ck[i];
  }
  cout << endl;
}
int main() {
  int t;
  t = 1;
  while (t--) {
    resolve();
  }
}
