#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  unsigned long n, range;
  string s;
  cin >> n >> s;
  n--;
  range = s.length();
  vector<char> output(range, 'X');
  do {
    for (int i = 0; i < range; i++)
      if (s[i] == '?' or output[i] == s[i])
        continue;
      else if (output[i] == 'X')
        output[i] = s[i];
      else
        output[i] = '?';
    if (n != 0) cin >> s;
  } while (n--);
  for (auto &p : output) cout << (char)tolower(p);
  return 0;
}
