#include <bits/stdc++.h>
using namespace std;
char ch[100100];
char mark[100100];
int main() {
  memset(mark, 0, sizeof(mark));
  int n, l;
  scanf("%d", &n);
  while (n--) {
    scanf("%s", ch);
    l = strlen(ch);
    for (int i = 0; i < l; i++) {
      if (ch[i] == '?')
        continue;
      else {
        if (mark[i] == 0) {
          mark[i] = ch[i];
          continue;
        }
        if (mark[i] != ch[i]) {
          mark[i] = '?';
        }
      }
    }
  }
  mark[l] = 0;
  for (int i = 0; i < l; i++) {
    if (mark[i] == 0)
      printf("a");
    else
      printf("%c", mark[i]);
  }
  printf("\n");
  return 0;
}
