#include <bits/stdc++.h>
using namespace std;
int n, i, x, NN;
char s[100010], a[100010];
bool OK[1000001];
int main() {
  scanf("%d\n", &NN);
  gets(a);
  n = strlen(a);
  for (x = 2; x <= NN; ++x) {
    gets(s);
    for (i = 0; i < n; ++i)
      if (s[i] != '?') {
        if (s[i] == a[i])
          continue;
        else {
          if (a[i] == '?') {
            a[i] = s[i];
            continue;
          } else if (a[i] != s[i])
            OK[i] = true;
        }
      }
  }
  for (i = 0; i < n; ++i) {
    if (a[i] == '?')
      printf("a");
    else if (!OK[i])
      printf("%c", a[i]);
    else
      printf("?");
  }
  return 0;
}
