#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:200000000")
int val[100100];
int main() {
  int n;
  scanf("%d", &n);
  int len = 0;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    len = (int)(s).size();
    for (int j = 0, maxj = (int)(s).size(); j < maxj; j++) {
      if (s[j] == '?' && val[j] == 0)
        val[j] = 1;
      else if (s[j] != '?') {
        if (val[j] != s[j] && val[j] != 1 && val[j] != 0)
          val[j] = 1000;
        else if (val[j] == 1 || val[j] == 0)
          val[j] = s[j];
      }
    }
  }
  for (int i = 0; i < len; i++) {
    if (val[i] == 1)
      printf("a");
    else if (val[i] == 1000)
      printf("?");
    else
      printf("%c", val[i]);
  }
  return 0;
}
