#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int n;
  cin >> n;
  vector<string> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  string ans;
  for (int i = 0; i < v[0].size(); i++) ans += ' ';
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < v[i].size(); j++) {
      if (v[i][j] == '?') continue;
      if (ans[j] == ' ')
        ans[j] = v[i][j];
      else if (ans[j] != v[i][j])
        ans[j] = '?';
    }
  }
  for (int i = 0; i < ans.size(); i++)
    if (ans[i] == ' ') ans[i] = 'a';
  cout << ans << endl;
  return 0;
}
