#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int len = 0;
  string a;
  for (int i = 0; i < n; i++) {
    string str;
    cin >> str;
    len = str.size();
    if (i == 0) a = str;
    for (int j = 0; j < len; j++) {
      if (a[j] == '?' && str[j] != '?') {
        a[j] = str[j];
        continue;
      }
      if (a[j] != '?' && str[j] == '?') continue;
      if (a[j] != str[j]) a[j] = 'F';
    }
  }
  for (int j = 0; j < len; j++) {
    if (a[j] == '?') a[j] = 'a';
    if (a[j] == 'F') a[j] = '?';
  }
  for (int i = 0; i < len; i++) cout << a[i];
}
