#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  set<int> ss[100002];
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> s;
    for (int j = 0; j < s.size(); ++j)
      if (s[j] != '?' and ss[j].size() <= 1) ss[j].insert(s[j]);
  }
  for (int i = 0; i < s.size(); ++i)
    if (ss[i].empty())
      printf("x");
    else if (ss[i].size() == 1)
      printf("%c", *ss[i].begin());
    else
      printf("?");
  puts("");
  return 0;
}
