#include <bits/stdc++.h>
using namespace std;
int main(void) {
  char ans[100000 + 5], str[100000 + 5];
  memset(ans, '.', sizeof(ans));
  int n, i;
  cin >> n;
  gets(str);
  while (n--) {
    gets(str);
    for (i = 0; str[i]; i++) {
      if (ans[i] == '?') {
        continue;
      }
      if (str[i] != '?') {
        if (ans[i] == '.') {
          ans[i] = str[i];
        } else if (ans[i] != str[i]) {
          ans[i] = '?';
        }
      }
    }
    ans[i] = '\0';
  }
  for (i = 0; ans[i]; i++) {
    if (ans[i] == '.') {
      putchar('a');
    } else {
      putchar(ans[i]);
    }
  }
  putchar('\n');
  return 0;
}
