#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<string> patterns(n);
  for (int i = 0; i < n; ++i) {
    cin >> patterns[i];
  }
  string res = patterns[0];
  for (int i = 0; i < res.length(); ++i) {
    res[i] = '!';
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < res.length(); ++j) {
      if (patterns[i][j] != '?') {
        if (res[j] == '!') {
          res[j] = patterns[i][j];
        } else if (res[j] != '!' && res[j] != patterns[i][j]) {
          res[j] = '?';
        }
      }
    }
  }
  for (int i = 0; i < res.length(); ++i) {
    if (res[i] == '!') {
      res[i] = 'a';
    }
  }
  cout << res << "\n";
  return 0;
}
