#include <bits/stdc++.h>
using namespace ::std;
const int N = 100000 + 5;
int n;
char s[N];
char ans[N];
bool needed[N];
int main(void) {
  memset(ans, '?', sizeof ans);
  scanf("%d", &n);
  scanf("%s", s);
  int len = strlen(s);
  ans[len] = '\0';
  for (int j = 0; j < len; j++) {
    if (s[j] != '?') ans[j] = s[j];
  }
  for (int i = 1; i < n; i++) {
    scanf("%s", s);
    for (int j = 0; j < len; j++) {
      if (s[j] == '?') continue;
      if (ans[j] == '?') {
        ans[j] = s[j];
      } else {
        if (s[j] != ans[j]) {
          needed[j] = true;
        }
      }
    }
  }
  for (int i = 0; i < len; i++) {
    if (needed[i]) ans[i] = '?';
    if (ans[i] == '?' && !needed[i]) ans[i] = 'a';
  }
  printf("%s\n", ans);
  return 0;
}
