#include <bits/stdc++.h>
char s[100010];
int ans[100010];
int main(int argc, const char* argv[]) {
  long n;
  scanf("%ld", &n);
  scanf("%s", s);
  long len = strlen(s);
  for (long i = 0; i < len; i++) {
    if (s[i] == '?') {
      ans[i] = 0;
    } else {
      ans[i] = s[i];
    }
  }
  for (long i = 1; i < n; i++) {
    scanf("%s", s);
    for (long j = 0; j < len; j++) {
      if (ans[j] != s[j]) {
        if (s[j] == '?') {
          continue;
        } else if (ans[j] == 0) {
          ans[j] = s[j];
        } else {
          ans[j] = -1;
        }
      }
    }
  }
  for (long i = 0; i < len; i++) {
    if (ans[i] == 0) {
      printf("a");
    } else if (ans[i] == -1) {
      printf("?");
    } else {
      printf("%c", ans[i]);
    }
  }
  printf("\n");
  return 0;
}
