#include <bits/stdc++.h>
using namespace std;
const int N = (int)(1e5 + 20);
const long long int INF = (1ll << 62);
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  vector<string> v(n);
  for (int i = 0; i < n; ++i) cin >> v[i];
  int m = v[0].length();
  for (int i = 0; i < m; ++i) {
    int last = 0;
    for (int j = 0; j < n; ++j) {
      if (v[j][i] != '?') {
        if (last && last != v[j][i]) {
          last = N;
          break;
        }
        last = v[j][i];
      }
    }
    if (last == N)
      cout << '?';
    else if (last == 0)
      cout << 'a';
    else
      cout << (char)(last);
  }
  return 0;
}
