#include <bits/stdc++.h>
using namespace std;
int n;
char abc[100005];
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  memset(abc, 0, sizeof(abc));
  string str;
  for (int i = 0; i < n; i++) {
    cin >> str;
    for (size_t j = 0; j < str.size(); j++) {
      if (abc[j] == 0 && str[j] != '?')
        abc[j] = str[j];
      else if (abc[j] > 1 && str[j] != '?' && abc[j] != str[j])
        abc[j] = 1;
    }
  }
  for (size_t j = 0; j < str.size(); j++) {
    if (abc[j] == 0)
      cout << 'a';
    else if (abc[j] == 1)
      cout << '?';
    else
      cout << abc[j];
  }
  return 0;
}
