#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
string a[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int len = a[0].length();
  for (int j = 0; j < len; j++) {
    char tmp = '?';
    for (int i = 0; i < n; i++) {
      if (tmp != '?') {
        if (a[i][j] != tmp && a[i][j] != '?') {
          tmp = ' ';
          break;
        }
      } else {
        if (a[i][j] != tmp) tmp = a[i][j];
      }
    }
    if (tmp == '?')
      putchar('a');
    else if (tmp == ' ')
      putchar('?');
    else
      putchar(tmp);
  }
  return 0;
}
