#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
string a[N];
int n;
void input() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
}
char ans[N];
int bb[N];
int main() {
  input();
  int m = a[1].size();
  for (int i = 0; i < m; i++) ans[i] = '?';
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == '?') {
        continue;
      } else if (ans[j] == '?') {
        if (bb[j] == 0) {
          ans[j] = a[i][j];
        }
      } else if (ans[j] != '?') {
        if (ans[j] != a[i][j]) {
          bb[j] = 1;
          ans[j] = '?';
        }
      }
    }
  }
  for (int j = 0; j < m; j++)
    if (ans[j] == '?' && bb[j] == 0) ans[j] = 'x';
  printf("%s", ans);
}
