#include <bits/stdc++.h>
using namespace std;
char *tpl[100001];
bool fin[100001] = {};
char str[100001];
char res[100001];
int main() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> str;
    tpl[i] = strdup(str);
  }
  int i = 0;
  for (int col = n;; ++i) {
    char t = '*';
    for (int j = 0; j < n; ++j) {
      if (fin[j]) continue;
      if (!tpl[j][i]) {
        fin[j] = true;
        --col;
        continue;
      }
      if (!((t == tpl[j][i]) || (tpl[j][i] == '?') || (t == '?'))) {
        if (t == '*')
          t = tpl[j][i];
        else
          t = '?';
      }
    }
    if (!col) break;
    if (t == '*') t = 'a';
    res[i] = t;
  }
  res[i] = '\0';
  cout << res;
  return 0;
}
