#include <bits/stdc++.h>
using namespace std;
const int mod = (int)1e7 + 7;
const int mx = 1234567;
char ans[mx], a[mx];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  int len;
  memset(ans, '*', sizeof(ans));
  for (int i = 0; i < n; i++) {
    cin >> a;
    len = strlen(a);
    for (int j = 0; a[j]; j++)
      if (a[j] != '?') {
        if (ans[j] == '*')
          ans[j] = a[j];
        else if (ans[j] != a[j])
          ans[j] = '?';
      }
  }
  for (int i = 0; i < len; i++) {
    if (ans[i] == '*')
      cout << "a";
    else
      cout << ans[i];
  }
  cout << endl;
  return 0;
}
