Developers often face with regular expression patterns. A pattern is usually defined as a string consisting of characters and metacharacters that sets the rules for your search. These patterns are most often used to check whether a particular string meets the certain rules.

In this task, a pattern will be a string consisting of small English letters and question marks ('?'). The question mark in the pattern is a metacharacter that denotes an arbitrary small letter of the English alphabet. We will assume that a string matches the pattern if we can transform the string into the pattern by replacing the question marks by the appropriate characters. For example, string aba matches patterns: ???, ??a, a?a, aba.

Programmers that work for the R1 company love puzzling each other (and themselves) with riddles. One of them is as follows: you are given *n* patterns of the same length, you need to find a pattern that contains as few question marks as possible, and intersects with each of the given patterns. Two patterns intersect if there is a string that matches both the first and the second pattern. Can you solve this riddle?
The first line contains a single integer *n* (1 ≤ *n* ≤ 10<sup class="upper-index">5</sup>) — the number of patterns. Next *n* lines contain the patterns.

It is guaranteed that the patterns can only consist of small English letters and symbols '?'. All patterns are non-empty and have the same length. The total length of all the patterns does not exceed 10<sup class="upper-index">5</sup> characters.
n = int(input())
w = []
flag = 0
for i in range(n):
    word = input()
    w.append(word)
if n == 1:
    cur = ""
    for i in range(len(w[0])):
        if w[0][i] == "?":
            cur += "a"
        else:
            cur += w[0][i]
else:
    cur = w[0]
    for i in range(1, n):
        check  = []
        for j, c in enumerate(w[i]):
            if cur[j] != c:
                if cur[j] == "?" and c != "?":
                    check.append(c) 
                elif cur[j] != "?" and c == "?":
                    check.append(cur[j])
                else:
                    break
            else:
                if cur[j] == "?" and c == "?":
                    check.append("x")
                else:
                    check.append(c)
        if len(check) !=  len(cur):
            flag = 1
            break
        else:
            cur = "".join(check)
# ans = ""
# for p in cur:
#     if p =="?":
#         ans += "x"
#     else:
#         ans += p    
 
if not flag:
    print(cur)
else:
    print("?")