#include <bits/stdc++.h>
using namespace std;
const int MaxN = 100 * 1000;
string s[MaxN];
bool q[26];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> s[i];
  for (int i = 0; i < (int)s[0].length(); i++) {
    for (int j = 0; j < 26; j++) q[j] = false;
    for (int j = 0; j < n; j++)
      if (s[j][i] != '?') q[s[j][i] - 'a'] = true;
    int count = 0;
    for (int j = 0; j < 26; j++)
      if (q[j]) count++;
    if (count == 0)
      printf("a");
    else {
      if (count == 1) {
        for (int j = 0; j < 26; j++)
          if (q[j]) printf("%c", char(j + 'a'));
      } else
        printf("?");
    }
  }
}
