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