#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int sz = s.size();
  char c;
  for (int i = 1; i < n; ++i) {
    for (int j = 0; j < sz; ++j) {
      cin >> c;
      if (c == '?') continue;
      if (s[j] == '?')
        s[j] = c;
      else if (s[j] != c)
        s[j] = 'X';
    }
  }
  for (int i = 0; i < sz; ++i) {
    if (s[i] == '?')
      printf("c");
    else if (s[i] == 'X')
      printf("?");
    else
      printf("%c", s[i]);
  }
  printf("\n");
  return 0;
}
