#include <bits/stdc++.h>
using namespace std;
string ch;
char c;
int main() {
  int n, k;
  scanf("%d", &n);
  cin >> ch;
  int len = ch.length();
  for (int i = 1; i < n; i++) {
    for (int k = 0; k < len; k++) {
      cin >> c;
      if (ch[k] == c) continue;
      if (ch[k] == '.') continue;
      if (ch[k] == '?' && c != '?')
        ch[k] = c;
      else if (ch[k] != '?' && c == '?')
        ;
      else
        ch[k] = '.';
    }
  }
  for (int i = 0; i < len; i++) {
    if (ch[i] == '?')
      printf("x");
    else if (ch[i] == '.')
      printf("?");
    else
      printf("%c", ch[i]);
  }
  return 0;
}
