#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  string S[N];
  for (int i = 0; i < N; i++) {
    cin >> S[i];
  }
  int j = 0, k = 0, count = 0, count_1 = 0, count_Q = 0;
  char Compare;
  for (j = 0; j < S[0].size(); j++) {
    for (k = 0; k < N; k++) {
      if (S[k][j] == '?') {
        count_Q++;
      } else {
        if (count_1 == 0) {
          count_1++;
          Compare = S[k][j];
        } else {
          if (S[k][j] != Compare) {
            count++;
            break;
          }
        }
      }
    }
    if (count_Q == N) {
      cout << "a";
      count_Q -= count_Q;
      count -= count;
      count_1 -= count_1;
    } else {
      if (count == 0) {
        cout << Compare;
        count -= count;
        count_1 -= count_1;
        count_Q -= count_Q;
      } else {
        cout << "?";
        count -= count;
        count_1 -= count_1;
        count_Q -= count_Q;
      }
    }
  }
  cout << "\n";
  return 0;
}
