#include <bits/stdc++.h>
using namespace std;
char ch[100010], temp[100010];
bool ok[100010];
int main() {
  int n;
  cin >> n;
  cin >> ch;
  int m = strlen(ch);
  for (int i = 1; i < n; i++) {
    cin >> temp;
    for (int j = 0; j < m; j++) {
      if (ch[j] >= 'a' && ch[j] <= 'z' && temp[j] >= 'a' && temp[j] <= 'z' &&
          ch[j] != temp[j])
        ok[j] = 1, ch[j] = '?';
      if (ch[j] == '?' && !ok[j]) ch[j] = temp[j];
    }
  }
  for (int i = 0; i < m; i++) {
    if (ch[i] == '?' && !ok[i])
      cout << "x";
    else
      cout << ch[i];
  }
  return 0;
}
