#include <bits/stdc++.h>
const int maxn = 100100;
char ch[maxn], ans[maxn];
int next[maxn];
int main() {
  int n, len;
  scanf("%d", &n);
  for (int i = 0; i < maxn; i++) {
    next[i] = i + 1;
    ans[i] = -1;
  }
  int f = 1;
  next[maxn - 1] = 0;
  while (n--) {
    scanf("%s", ch);
    if (f == 1) {
      f++;
      len = strlen(ch);
    }
    next[len - 1] = -1;
    ans[len] = 0;
    int front = maxn - 1, t = next[maxn - 1];
    while (t != -1) {
      bool flag = false;
      if (ans[t] != ch[t]) {
        if (ans[t] == -1 && ch[t] != '?')
          ans[t] = ch[t];
        else if (ch[t] != '?') {
          ans[t] = '?';
          next[front] = next[t];
          flag = true;
        }
      }
      if (!flag) front = t;
      t = next[t];
    }
  }
  while (ans[++n] != 0)
    if (ans[n] == -1) ans[n] = 'a';
  printf("%s\n", ans);
  return 0;
}
