n = int(input()) coms = set(input()) for i in range(n-1): coms = coms.intersection(set(input()))#求交集 print(sorted(list(coms))[0])#单个字母也可以