#include <bits/stdc++.h>
char str[100001], str2[100001];
int chk[100001];
int main() {
  int n;
  scanf("%d %s", &n, str);
  for (int i = 1; i < n; i++) {
    scanf(" %s", str2);
    for (int j = 0; str2[j]; j++) {
      if (str[j] != str2[j]) {
        if (str[j] == '?' && chk[j] == 0)
          str[j] = str2[j];
        else if (str[j] != '?' && str2[j] != '?')
          str[j] = '?', chk[j] = 1;
      }
    }
  }
  for (int i = 0; str[i]; i++) {
    if (chk[i] == 0 && str[i] == '?')
      printf("a");
    else
      printf("%c", str[i]);
  }
  return 0;
}
