n = int(input()) s = [input() for _ in range(n)] m = min(n, 10) used = [False for _ in range(1 << m)] for i in range(n): mask = 0 for j in range(m): if s[i][j] == 'b': mask |= (1 << j) used[mask] = True for mask in range(1 << m): if not used[mask]: ans = [] for j in range(m): if (mask >> j) & 1 != 0: ans.append('b') else: ans.append('a') if m < n: ans.append("a" * (n - m)) print(*ans, sep="") exit()