#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> arr;
  for (int i = 0; i < n; i++) {
    string t;
    cin >> t;
    arr.push_back(t);
  }
  string ans = "";
  for (int i = 0; i < arr[0].length(); i++) {
    string x = "?";
    int k = -1;
    bool full = false;
    bool done = false;
    for (int j = 0; j < n; j++) {
      if (arr[j][i] != '?' && x == "?") {
        x = arr[j][i];
        full = true;
        k = j;
      } else if (arr[j][i] != '?' && x != "?" && arr[j][i] != arr[k][i]) {
        ans += "?";
        done = true;
        break;
      }
    }
    if (!done) {
      if (!full)
        ans += "a";
      else
        ans += x;
    }
  }
  cout << ans;
  return 0;
}
