#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:33554432")
using namespace std;
int n;
int bad[1 << 17];
char res[1 << 17];
char buf[1 << 17];
int main() {
  memset(bad, 0, sizeof(bad));
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%s", buf);
    if (i == 0)
      memcpy(res, buf, sizeof(res));
    else {
      for (int j = 0; buf[j]; ++j) {
        if (res[j] != '?') {
          if (buf[j] != '?' && buf[j] != res[j]) bad[j] = 1;
        } else
          res[j] = buf[j];
      }
    }
  }
  for (int i = 0; res[i]; ++i) {
    if (bad[i])
      printf("?");
    else {
      if (res[i] == '?') res[i] = 'a';
      printf("%c", res[i]);
    }
  }
  printf("\n");
  return 0;
}
