Problem: Fox Ciel is going to publish a paper on FOCS (Foxes Operated Computer Systems, pronounce: "Fox"). She heard a rumor: the authors list on the paper is always sorted in the lexicographical order. 

After checking some examples, she found out that sometimes it wasn't true. On some papers authors' names weren't sorted in lexicographical order in normal sense. But it was always true that after some modification of the order of letters in alphabet, the order of authors becomes lexicographical!

She wants to know, if there exists an order of letters in Latin alphabet such that the names on the paper she is submitting are following in the lexicographical order. If so, you should find out any such order.

Lexicographical order is defined in following way. When we compare s and t, first we find the leftmost position with differing characters: si ≠ ti. If there is no such position (i. e. s is a prefix of t or vice versa) the shortest string is less. Otherwise, we compare characters si and ti according to their order in alphabet.

Input

The first line contains an integer n (1 ≤ n ≤ 100): number of names.

Each of the following n lines contain one string namei (1 ≤ |namei| ≤ 100), the i-th name. Each name contains only lowercase Latin letters. All names are different.

Output

If there exists such order of letters that the given names are sorted lexicographically, output any such order as a permutation of characters 'a'–'z' (i. e. first output the first letter of the modified alphabet, then the second, and so on).

Otherwise output a single word "Impossible" (without quotes).

Examples

Input

3
rivest
shamir
adleman


Output

bcdefghijklmnopqrsatuvwxyz


Input

10
tourist
petr
wjmzbmr
yeputons
vepifanov
scottwu
oooooooooooooooo
subscriber
rowdark
tankengineer


Output

Impossible


Input

10
petr
egor
endagorion
feferivan
ilovetanyaromanova
kostka
dmitriyh
maratsnowbear
bredorjaguarturnik
cgyforever


Output

aghjlnopefikdmbcqrstuvwxyz


Input

7
car
care
careful
carefully
becarefuldontforgetsomething
otherwiseyouwillbehacked
goodluck


Output

acbdefhijklmnogpqrstuvwxyz

Solution (in PYTHON3):

Solution:
class Graph:
    class Vertex:
        __slots__ = '_element'

        def __init__(self,ele):
            self._element = ele

        def element(self):
            return self._element

        def __hash__(self):
            return hash(id(self))

        def __str__(self):
            return str(self._element)

    class Edge:
        __slots__ = '_origin' , '_destination' , '_element'

        def __init__(self,u,v,x):
            self._origin = u
            self._destination = v
            self._element = x

        def endpoints(self):
            return (self._origin,self._destination)

        def opposite(self,v):
            if not isinstance(v,Graph.Vertex):
                raise TypeError('not a vertex')
            return self._destination if v is self._origin else self._origin
            raise ValueError('not incident to edge')

        def element(self):
            return self._element

        def __hash__(self):
            return hash((self._origin,self._destination))

        def __str__(self):
            return '({0},{1},{2})'.format(self._origin,self._destination,self._element)

    def __init__(self,directed=False):
        self._outgoing = {}
        self._incoming = {} if directed else self._outgoing

    def _validate_vertex(self,v):
        if not isinstance(v, self.Vertex):
            raise TypeError('Vertex expected')
        if v not in self._outgoing:
            raise ValueError('Vertex does not belong to this graph.')

    def is_directed(self):
        return self._incoming is not self._outgoing

    def vertex_count(self):
        return len(self._outgoing)

    def vertices(self):
        return self._outgoing.keys()

    def edge_count(self):
        total = sum(len(self._outgoing[v]) for v in self._outgoing)
        return total if self.is_directed() else total//2

    def edges(self):
        result = set()
        for secondary_map in self._outgoing.values():
            result.update(secondary_map.values())
        return result

    def get_edge(self,u,v):
        self._validate_vertex(u)
        self._validate_vertex(v)
        return self._outgoing[u].get(v)

    def degree(self,v, outgoing = True):
        self._validate_vertex(v)
        adj = self._outgoing if outgoing else self._incoming
        return len(adj[v])

    def incident_edges(self, v, outgoing=True):   
        self._validate_vertex(v)
        adj = self._outgoing if outgoing else self._incoming
        for edge in adj[v].values():
            yield edge
            
    def insert_vertex(self,x=None):
        v = self.Vertex(x)
        self._outgoing[v] = {}
        if self.is_directed():
            self._incoming[v] = {}        
        return v

    def insert_edge(self,u,v,x=None):
        if self.get_edge(u, v) is not None: 
            return None
        e = self.Edge(u, v, x)
        self._outgoing[u][v] = e
        self._incoming[v][u] = e
# Class bulit-in methods end here

def graph_from_edgelist(E, directed = False):
    g = Graph(directed)
    V = set()
    for e in E:
        V.add(e[0])
        V.add(e[1])
        
    verts = {}
    for v in V:
        verts[v] = g.insert_vertex(v)

    for e in E:
        src = e[0]
        dest = e[1]
        element = e[2] if len(e) > 2 else None
        g.insert_edge(verts[src],verts[dest],element)
    return g

def topological_sort(g):
    topo = []
    ready = []
    incount = {}
    for u in g.vertices():
        incount[u] = g.degree(u,False)
        if incount[u] == 0:
            ready.append(u)
    while len(ready) > 0:
        u = ready.pop()
        topo.append(u)
        for e in g.incident_edges(u):
            v = e.opposite(u)
            incount[v] -= 1
            if incount[v] == 0:
                ready.append(v)
    return topo

def compare(txt1,txt2):
    i = 0
    while txt1[i] == txt2[i]:
        if i == len(txt1)-1:
            return None
        if i == len(txt2)-1:
            return 'Imp'
        i += 1
    return (txt1[i],txt2[i])

def alphaprint(text):
    lis = list(text)
    for i in range(97,123,1):
        if chr(i) not in lis:
            lis.append(chr(i))
    print(''.join(lis))

n = int(input())
lis = []
cons = []
idf = 0
for i in range(n):
    lis.append(input())
for i in range(n-1):
    for j in range(i+1,n):
        temp = compare(lis[i],lis[j])
        if temp == 'Imp' and idf == 0:
            print('Impossible')
            idf = 1
        if temp != None and idf == 0:
            cons.append(temp)
if idf == 0:
    graph = graph_from_edgelist(cons,True)
    order = topological_sort(graph)
    vert = graph.vertex_count()
    orderlis = ''.join(str(x) for x in order)
    if len(orderlis) != vert:
        print('Impossible')
    else:
        alphaprint(orderlis)