#include <bits/stdc++.h>
using namespace std;
char a[100041];
int b[100041];
int c[100041];
string s;
int main() {
  int n;
  cin >> n;
  int len;
  for (long long i = 0; i < 100003; i++) a[i] = '?', c[i] = 1;
  for (long long l = 0; l < n; l++) {
    cin >> s;
    len = s.size();
    for (long long i = 0; i < s.size(); i++) {
      if (s[i] == '?') {
        continue;
      }
      if (c[i]) {
        c[i] = 0;
        a[i] = s[i];
      } else {
        if (a[i] != s[i]) b[i] = 1;
      }
    }
  }
  for (long long i = 0; i < len; i++) {
    if (b[i])
      cout << '?';
    else if (c[i])
      cout << 'x';
    else
      cout << a[i];
  }
}
