#!/usr/bin/python3

import sys

n = int(input())
ss = [input() for _ in range(n)]
ss = [[ord(x) - ord('a') for x in s] for s in ss]
adj = [[False for _ in range(26)] for _ in range(26)]

for i in range(n - 1):
    l = min(len(ss[i]), len(ss[i+1]))
    if ss[i][:l] == ss[i+1][:l]:
        if len(ss[i+1]) < len(ss[i]):
            print("impossible")
            sys.exit()
        continue
    j = 0
    while ss[i][j] == ss[i+1][j]:
        j += 1
    adj[ss[i][j]][ss[i+1][j]] = True

for j in range(26):
    for i in range(26):
        for k in range(26):
            if adj[i][j] and adj[j][k]:
                adj[i][k] = True

if any(adj[i][i] for i in range(26)):
    print("impossible")
else:
    output = []
    while len(output) < 26:
        possible_digits = [i for i in range(26) if i not in output and all((j in output or adj[j][i] == False) for j in range(26))]
        output += possible_digits
    print("".join(chr(x + ord('a')) for x in output))
