#include <bits/stdc++.h>
using namespace std;
char s[100005];
char liu[100005];
int main(void) {
  int n, i, j, len;
  while (scanf("%d", &n) == 1) {
    memset(liu, '!', sizeof(liu));
    for (i = 0; i < n; i++) {
      cin >> s;
      len = strlen(s);
      for (j = 0; j < len; j++) {
        if (s[j] == '?') {
          continue;
        } else {
          if (liu[j] == '!') {
            liu[j] = s[j];
          } else {
            if (liu[j] != s[j]) {
              liu[j] = '?';
            }
          }
        }
      }
    }
    for (i = 0; i < len; i++) {
      if (liu[i] == '!') {
        liu[i] = 'a';
      }
      cout << liu[i];
    }
    cout << endl;
  }
  return 0;
}
