#include <bits/stdc++.h>
using namespace std;
char s[100005], final[100005];
int main(void) {
  int n, len, i, j;
  while (scanf("%d", &n) != EOF) {
    scanf("%s", final);
    len = strlen(final);
    for (i = 2; i <= n; i++) {
      scanf("%s", s);
      for (j = 0; j < len; j++) {
        if (final[j] == '!') {
          continue;
        }
        if (final[j] == '?' && s[j] == '?') {
          continue;
        }
        if (final[j] == '?') {
          final[j] = s[j];
          continue;
        }
        if (s[j] == '?') {
          continue;
        }
        if (final[j] != s[j]) final[j] = '!';
      }
    }
    for (i = 0; i < len; i++) {
      if (final[i] == '?') {
        printf("a");
        continue;
      }
      if (final[i] == '!') {
        printf("?");
        continue;
      }
      printf("%c", final[i]);
    }
    printf("\n");
  }
  return 0;
}
