#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T sqr(T a) {
  return a * a;
}
template <typename T>
ostream& operator<<(ostream& os, vector<T> v) {
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  cout << endl;
  return cout;
}
void print() { cout << endl; }
template <typename T, typename... Ts>
void print(T x, Ts... xs) {
  cout << x << " ";
  print(xs...);
};
int val(char ch) {
  if (ch == '?') return -1;
  return ch - 'a';
}
int main() {
  int n;
  cin >> n;
  vector<string> p(n, "");
  for (int i = 0; i < n; i++) cin >> p[i];
  int k = p[0].length();
  vector<int> v(k, -1);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < k; j++) {
      if (v[j] == -2) continue;
      int l = val(p[i][j]);
      if (l == -1) continue;
      if (v[j] == -1 && l >= 0) {
        v[j] = l;
      } else {
        if (v[j] != l) v[j] = -2;
      }
    }
  }
  string ret(k, 'x');
  for (int i = 0; i < k; i++) {
    if (v[i] == -1)
      continue;
    else if (v[i] == -2)
      ret[i] = '?';
    else
      ret[i] = 'a' + v[i];
  }
  cout << ret;
}
