#include <bits/stdc++.h>
using namespace std;
int n, m;
char a[101001], b[101001];
int main() {
  scanf("%d", &n);
  for (int i = (0); i < (n); i++) {
    scanf("%s", a);
    m = strlen(a);
    for (int i = (0); i < (m); i++) {
      if (a[i] == '?')
        continue;
      else if (a[i] != b[i]) {
        if (!b[i])
          b[i] = a[i];
        else
          b[i] = '?';
      }
    }
  }
  for (int i = (0); i < (m); i++)
    if (!b[i]) b[i] = 'a';
  puts(b);
  return 0;
}
