#include <bits/stdc++.h>
using namespace std;
char s[100005];
int c[100005], N, full;
int LG;
void read() {
  scanf("%d\n", &N);
  for (int line = 1; line <= N; ++line) {
    scanf("%s", s + 1);
    s[0] = '#';
    int len = strlen(s) - 1;
    LG = len;
    for (int i = 1; i <= len; ++i) {
      if (s[i] == '?') continue;
      if (c[i] == 0) {
        c[i] = s[i] - 'a' + 1;
        continue;
      }
      if (c[i] == s[i] - 'a' + 1)
        continue;
      else {
        if (c[i] != -1) {
          c[i] = -1;
          full++;
        }
        if (full == len) return;
      }
    }
  }
}
int main() {
  read();
  for (int i = 1; i <= LG; ++i)
    if (c[i] == -1)
      printf("?");
    else if (c[i] == 0)
      printf("x");
    else
      printf("%c", c[i] + 'a' - 1);
  return 0;
}
