#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[1000000], b[1000000];
  int n;
  cin >> n >> a;
  int l = strlen(a);
  for (int i = 1; i < n; i++) {
    cin >> b;
    for (int j = 0; j < l; j++) {
      if (a[j] == '?')
        a[j] = b[j];
      else if (b[j] == '?')
        continue;
      else if (a[j] != b[j])
        a[j] = '0';
    }
  }
  for (int i = 0; i < l; i++) {
    if (a[i] == '0')
      a[i] = '?';
    else if (a[i] == '?')
      a[i] = 'x';
  }
  cout << a;
  return 0;
}
