#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  char a[100100], str[100100];
  int l;
  scanf("%s", a);
  l = strlen(a);
  for (int i = 0; i < n - 1; i += 1) {
    scanf("%s", str);
    for (int j = 0; j < l; j += 1) {
      if (a[j] == '?')
        a[j] = str[j];
      else if (a[j] != str[j] && str[j] != '?')
        a[j] = '*';
    }
  }
  for (int i = 0; i < l; i += 1) {
    if (a[i] == '*')
      cout << "?";
    else if (a[i] == '?')
      cout << "x";
    else
      cout << a[i];
  }
  printf("\n");
  return 0;
}
