#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100 * 1000 + 5;
string s[MAXN];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> s[i];
  string ans = "";
  for (int j = 0; j < (int)s[0].length(); j++) {
    bool b = false, b2 = false;
    char ch = '?';
    for (int i = 0; i < n; i++) {
      if (s[i][j] != '?') {
        if (ch == '?') {
          b2 = true;
          ch = s[i][j];
        } else if (s[i][j] != ch) {
          b = true;
        }
      }
    }
    if (b)
      ans += '?';
    else if (b2)
      ans += ch;
    else
      ans += 'x';
  }
  cout << ans << endl;
  return 0;
}
