#include <bits/stdc++.h>
using namespace std;
float max(long long a, long long b) {
  if (a > b)
    return (float)a;
  else
    return (float)b;
}
int min(int a, int b) {
  if (a < b)
    return a;
  else
    return b;
}
void solve() {}
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int l = s.length();
  --n;
  while (n--) {
    string s2;
    cin >> s2;
    for (int i = 0; i < l; i++) {
      if (s[i] == 0 || s[i] == '?' || s[i] == s2[i])
        s[i] = s2[i];
      else if (s2[i] == '?')
        continue;
      else
        s[i] = -1;
    }
  }
  for (int i = 0; i < l; i++) {
    if (s[i] == '?') s[i] = 'a';
    if (s[i] == -1) s[i] = '?';
    cout << s[i];
  }
  return 0;
}
