import sys
#sys.setrecursionlimit(500000)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def TI(): return tuple(map(int,sys.stdin.readline().rstrip().split()))
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def SI(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip())
#for i, pi in enumerate(p):
from collections import defaultdict,deque
import bisect
import itertools
dic = defaultdict(int)
d = deque()

N = I()
check = set()
for _ in range(N):
  S = LS()
  s = []
  count = 0
  for j in S:
    if j == 'b': 
      count += 1
  check.add(count)
for  i in range(N+1):
  if not i in check:
    print('b'*i+'a'*(N-i))
    exit()