#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tt;
  tt = 1;
  while (tt--) {
    int n;
    cin >> n;
    string s;
    int i;
    vector<string> v;
    for (i = 0; i < n; i++) {
      cin >> s;
      v.push_back(s);
    }
    set<char> st;
    int l = s.length();
    string str = "";
    for (int j = 0; j < l; j++) {
      st.clear();
      char c;
      for (i = 0; i < n; i++) {
        if (v[i][j] != '?') st.insert(v[i][j]), c = v[i][j];
      }
      if (st.size() == 0)
        str += 'a';
      else if (st.size() == 1)
        str += c;
      else
        str += '?';
    }
    cout << str << "\n";
  }
}
