#include <bits/stdc++.h>
using namespace std;
char str[100001];
char mul[100001];
char res[100001];
int main() {
  int n, len;
  int i, j;
  scanf("%d %s", &n, str);
  len = strlen(str);
  strcpy(res, str);
  for (i = 1; i < n; i++) {
    scanf("%s", str);
    for (j = 0; j < len; j++) {
      if (mul[j] == 1) continue;
      if (str[j] != res[j]) {
        if (str[j] == '?')
          ;
        else if (res[j] == '?')
          res[j] = str[j];
        else {
          mul[j] = 1;
          res[j] = '?';
        }
      }
    }
  }
  for (i = 0; i < len; i++) {
    if (res[i] == '?' && mul[i] != 1)
      printf("a");
    else
      printf("%c", res[i]);
  }
  printf("\n");
  return 0;
}
