#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  string s, ingresada;
  cin >> n >> s;
  long long size = s.size();
  char string_final[size + 1];
  if (n == 1) {
    for (int i = 0; i < size; i++) {
      if (s[i] == '?') {
        s[i] = 'a';
      }
    }
    cout << s << endl;
  } else {
    for (int i = 0; i < size + 1; i++) {
      if (s[i] == '?') {
        string_final[i] = '!';
      } else {
        string_final[i] = s[i];
      }
    }
    for (int i = 0; i < n - 1; i++) {
      cin >> ingresada;
      for (int j = 0; j < size + 1; j++) {
        if (string_final[j] != ingresada[j] && string_final[j] != '!') {
          if (ingresada[j] != '?') {
            string_final[j] = '?';
          }
        } else {
          if (string_final[j] == '!' && ingresada[j] != '?') {
            string_final[j] = ingresada[j];
          }
        }
      }
    }
    for (int i = 0; i < size; i++) {
      if (string_final[i] == '!') {
        string_final[i] = 'a';
      }
    }
    cout << string_final << endl;
  }
  return 0;
}
