#include <bits/stdc++.h>
long key[100001] = {0};
char temp[100003], s[100003];
int main() {
  long n, m, len, i;
  scanf("%ld", &n);
  scanf("%s", &s);
  len = strlen(s);
  m = n;
  while (--m) {
    scanf("%s", &temp);
    for (i = 0; i < len; i++) {
      if (s[i] != '?' && temp[i] != '?')
        if (s[i] != temp[i]) key[i] = 1;
      if (s[i] == '?' && temp[i] != '?') s[i] = temp[i];
    }
  }
  for (i = 0; i < len; i++) {
    if (key[i] == 1)
      printf("?");
    else if (s[i] == '?')
      printf("a");
    else
      printf("%c", s[i]);
  }
  return 0;
}
