#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, l;
  char s[500100], b[500100];
  int a[500100];
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%s", s);
    l = (int)strlen(s);
    for (int j = 0; j < l; j++)
      if (s[j] != '?' && s[j] != b[j]) {
        a[j]++;
        b[j] = s[j];
      }
  }
  for (int i = 0; i < l; i++) {
    if (a[i] == 0)
      printf("a");
    else if (a[i] == 1)
      printf("%c", b[i]);
    else
      printf("?");
  }
  return 0;
}
