#include <bits/stdc++.h>
const int M = 1e5 + 10;
char str[M], c, n[M];
int m;
int main() {
  scanf("%d", &m);
  getchar();
  memset(n, 0, sizeof(n));
  int len;
  while (m--) {
    len = 0;
    while (c = getchar()) {
      if (c == '\n') break;
      if (n[len] == 0 && c != '?')
        n[len] = c;
      else if (n[len] >= 'a' && n[len] <= 'z' && n[len] != c && c != '?')
        n[len] = '?';
      len++;
    }
  }
  for (int i = 0; i < len; i++)
    if (n[i] == 0) n[i] = 'x';
  printf("%s", n);
  printf("\n");
}
