#include <bits/stdc++.h>
using namespace std;
char cacat[100005], sir[100005], s[100005];
int indici[100005];
int main() {
  cin.sync_with_stdio(false);
  int i, n, len, test, j;
  char c;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> s;
    test = strlen(s);
    strcat(sir, s);
    indici[i] = test * (i - 1);
  }
  len = strlen(s);
  for (j = 1; j <= len; j++) {
    test = 0;
    for (i = 1; i <= n; i++) {
      if (sir[indici[i]] >= 'a' && sir[indici[i]] <= 'z' && test == 1 &&
          sir[indici[i]] != c)
        test = 2;
      else if ((sir[indici[i]] >= 'a' && sir[indici[i]] <= 'z') && !test) {
        test = 1;
        c = sir[indici[i]];
      }
      indici[i]++;
    }
    if (test == 0)
      s[j] = 'a';
    else if (test == 1)
      s[j] = c;
    else if (test == 2)
      s[j] = '?';
  }
  cout << (s + 1) << "\n";
  return 0;
}
