#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string ans;
  string t;
  for (int i = 0; i < n; i++) {
    cin >> t;
    if (i == 0) {
      ans = t;
      continue;
    }
    for (int j = 0; j < t.size(); j++)
      if (ans[j] == '?')
        ans[j] = t[j];
      else if (ans[j] == t[j] || t[j] == '?')
        ans[j] = ans[j];
      else
        ans[j] = '.';
  }
  for (int i = 0; i < ans.size(); i++)
    if (ans[i] == '.')
      ans[i] = '?';
    else if (ans[i] == '?')
      ans[i] = 'a';
  ios_base::sync_with_stdio(false);
  printf("%s", ans.c_str());
  return 0;
}
