#include <bits/stdc++.h>
int main() {
  static char s[100000 + 1], cc[100000 + 1];
  static int bad[100000];
  int n, m, i;
  scanf("%d", &n);
  memset(cc, '#', sizeof cc);
  while (n--) {
    scanf("%s", s);
    m = strlen(s);
    for (i = 0; i < m; i++)
      if (cc[i] != '#' && s[i] != '?' && s[i] != cc[i])
        bad[i] = 1;
      else if (cc[i] == '#' && s[i] != '?')
        cc[i] = s[i];
  }
  cc[m] = 0;
  for (i = 0; i < m; i++)
    if (bad[i])
      cc[i] = '?';
    else if (cc[i] == '#')
      cc[i] = 'a';
  printf("%s\n", cc);
  return 0;
}
