#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
string str[N];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> str[i];
  }
  for (int i = 0; i < ((int)(str[0]).size()); i++) {
    bool all = true;
    char only = 0;
    for (int j = 0; j < n; j++) {
      if (str[j][i] == '?') continue;
      all = false;
      if (only == 0)
        only = str[j][i];
      else if (only != 0 && str[j][i] != only)
        only = -1;
    }
    if (all) {
      printf("a");
    } else if (only != -1) {
      printf("%c", only);
    } else {
      printf("?");
    }
  }
  puts("");
  return 0;
}
