#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
const long double PI = 3.14159265;
long long int powerWithMod(long long int base, long long int exponent,
                           long long int modulus = LLONG_MAX) {
  long long int result = 1;
  base %= modulus;
  while (exponent > 0) {
    if (exponent % 2 == 1) result = (result * base) % modulus;
    exponent >>= 1;
    base = (base * base) % modulus;
  }
  return result;
}
long long int modInverse(long long int a, long long int m = MOD) {
  return powerWithMod(a, m - 2, m);
}
int n;
string a[123456], ans;
char check(int x) {
  char ans = '?';
  for (int i = 0; i < n; i++) {
    if (a[i][x] == '?') continue;
    if (ans == '?')
      ans = a[i][x];
    else if (a[i][x] != ans)
      return '0';
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < a[0].size(); i++) {
    char curr = check(i);
    if (curr == '?')
      ans.push_back('a');
    else if (curr == '0')
      ans.push_back('?');
    else
      ans.push_back(curr);
  }
  cout << ans << "\n";
  return 0;
}
