N = int(input()) C = {} for _ in range(N): s = list(input()) for i in range(97,123): s1 = s[:] s1.append(chr(i)) s1 = tuple(sorted(s1)) C[s1] = C.get(s1,0)+1 ans = -1 for s in C: if C[s]==1: ans = "".join(s) break print(ans)