#include <bits/stdc++.h>
using namespace std;
const int N = 200000;
int n, len;
char ans[N], foo[N];
int main() {
  scanf("%d", &n);
  memset(ans, '*', sizeof ans);
  for (int i = 0; i < n; i++) {
    scanf("%s", foo);
    len = strlen(foo);
    for (int j = 0; j < len; j++) {
      if (foo[j] != '?') {
        if (ans[j] == '*') {
          ans[j] = foo[j];
        } else if (ans[j] != foo[j]) {
          ans[j] = '?';
        }
      }
    }
  }
  for (int j = 0; j < len; j++) {
    putchar(ans[j] == '*' ? 'a' : ans[j]);
  }
  return 0;
}
