#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, patt[N];
string s;
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> s;
    for (int j = 0; j < s.size(); ++j)
      if (s[j] != '?') {
        if (patt[j] == 0)
          patt[j] = s[j] - 'a' + 1;
        else if (patt[j] != s[j] - 'a' + 1)
          patt[j] = 27;
      }
  }
  for (int i = 0; i < s.size(); ++i) {
    if (patt[i] == 0)
      cout << "a";
    else if (patt[i] == 27)
      cout << "?";
    else
      cout << (char)(patt[i] + 'a' - 1);
  }
  return 0;
}
