#include <bits/stdc++.h>
using namespace std;
vector<pair<char, bool>> ans;
unordered_map<int, int> ind;
void f(string s) {
  int size = ind.size();
  for (int i = 0; i < s.size(); i++) {
    int z = 0;
    if (ind.count(i))
      z = ind[i] - 1;
    else
      continue;
    if (ans[z].first != '?' && s[z] != '?' && ans[z].second &&
        ans[z].first != s[z]) {
      ans[z] = make_pair('?', false);
      ind.erase(z);
    } else if (ans[z].first == '?' && ans[z].second && s[z] != '?')
      ans[z] = make_pair(s[z], true);
  }
}
int main() {
  int n;
  cin >> n;
  string s, t;
  cin >> s;
  ans.resize(s.size());
  fill(ans.begin(), ans.end(), make_pair('?', true));
  for (int i = 0; i < s.size(); i++) {
    ind[i] = i + 1;
  }
  f(s);
  for (int i = 0; i < n - 1; i++) {
    cin >> s;
    f(s);
  }
  for (int i = 0; i < ans.size(); i++) {
    if (ans[i].first == '?' && !ans[i].second) {
      cout << '?';
    } else if (ans[i].first != '?')
      cout << ans[i].first;
    else
      cout << 'a';
  }
  return 0;
}
