#include <bits/stdc++.h>
using namespace std;
int cmpfunc(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main() {
  int n, i;
  string s, s1;
  cin >> n >> s;
  if (n == 1) {
    for (i = 0; i < s.length(); i++) {
      if (s[i] == '?')
        putchar('a');
      else
        putchar(s[i]);
    }
    putchar(10);
    return 0;
  } else {
    n--;
    while (n--) {
      cin >> s1;
      for (i = 0; i < s1.length(); i++) {
        if (s[i] != s1[i] && s[i] != '?' && s1[i] != '?') {
          s[i] = '.';
        } else if (s[i] != s1[i]) {
          if (s1[i] != '?') s[i] = s1[i];
        }
      }
    }
  }
  for (i = 0; i < s.length(); i++) {
    if (s[i] == '.')
      cout << '?';
    else if (s[i] == '?')
      cout << 'a';
    else
      cout << s[i];
  }
  putchar(10);
  return 0;
}
