#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  string s;
  cin >> s;
  long long l = s.size();
  if (n == 1) {
    for (long long i = 0; i < l; i++)
      if (s[i] == '?') s[i] = 'x';
  }
  string a = s;
  n--;
  while (n--) {
    string s;
    cin >> s;
    for (long long i = 0; i < l; i++) {
      if (s[i] != '?') {
        if (a[i] != s[i] && a[i] != '?' && a[i] != 'A') {
          a[i] = 'X';
        }
        if (a[i] != s[i] && a[i] == '?') {
          a[i] = s[i];
        }
        if (a[i] != s[i] && a[i] == 'A') {
          a[i] = s[i];
        }
      } else {
        if (s[i] == a[i]) a[i] = 'A';
      }
    }
  }
  for (long long i = 0; i < l; i++) {
    if (a[i] == 'A') a[i] = 'x';
    if (a[i] == 'X') a[i] = '?';
  }
  cout << a;
  return 0;
}
