#include <bits/stdc++.h>
using namespace std;
string A[100005];
int N;
bool cnt[100005][70];
int s[100005][2];
int main() {
  int x, i, j, k;
  cin >> N;
  for (i = 1; i <= N; i++) cin >> A[i];
  for (i = 1; i <= N; i++) {
    x = A[i].size();
    for (j = 0; j < x; j++)
      if (A[i][j] != '?') {
        if (!cnt[j][A[i][j] - 'a']) s[j][0]++;
        cnt[j][A[i][j] - 'a'] = 1;
        s[j][1] = A[i][j] - 'a';
      }
  }
  for (i = 0; i < x; i++) {
    if (s[i][0] >= 2) {
      cout << "?";
    } else
      printf("%c", s[i][1] + 'a');
  }
  return 0;
}
