#include <bits/stdc++.h>
using namespace std;
int n;
int k = 0, t, q = 0;
string s[100010];
char ch, zx;
set<char> myset;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> s[i];
  t = (int)s[1].size();
  for (int j = 0; j < t; j++) {
    for (int i = 1; i <= n; i++) {
      zx = s[i][j];
      myset.insert(zx);
      if (s[i][j] == '?')
        k++;
      else {
        ch = s[i][j];
      }
    }
    if (k == n)
      cout << 'x';
    else if ((int)myset.size() == 2 && k > 0)
      cout << ch;
    else if ((int)myset.size() == 2 && k == 0)
      cout << '?';
    else if (k == 0 && (int)myset.size() == 1)
      cout << ch;
    else
      cout << '?';
    k = 0;
    myset.clear();
  }
  return 0;
}
