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 JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.TreeSet;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.AbstractCollection;
import java.util.TreeMap;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.LinkedList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author zodiacLeo
 */
public class Main
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        FastPrinter out = new FastPrinter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC
    {
        private int V;
        private int[] was;
        private int[] deg;
        private boolean[] alpha = new boolean[26];
        private final static int VISITED = 1;
        private final static int UNVISITED = 0;
        private final static int RELAXED = 2;
        private IntegerGraph g;
        private NameMap<Character> map = new NameMap<Character>(true);
        private TreeSet<IntegerEdge> edges = new TreeSet<>();

        public void solve(int testNumber, FastScanner in, FastPrinter out)
        {
            int n = in.nextInt();
            String[] names = new String[n];
            for (int i = 0; i < n; i++)
            {
                names[i] = in.next();
            }

            outer:
            for (int i = 1; i < n; i++)
            {
                int m = Math.min(names[i - 1].length(), names[i].length());
                for (int j = 0; j < m; j++)
                {
                    char prev = names[i - 1].charAt(j);
                    char now = names[i].charAt(j);
                    if (prev != now)
                    {
                        int from = map.put(prev);
                        int to = map.put(now);
                        edges.add(new IntegerEdge(from, to));
                        continue outer;
                    }
                }
                if (names[i].length() < names[i - 1].length())
                {
                    out.println("Impossible");
                    return;
                }
            }
            V = map.size();
            was = new int[V];
            deg = new int[V];
            g = new IntegerGraph(V, 0);

            while (!edges.isEmpty())
            {
                IntegerEdge e = edges.pollFirst();
                g.addEdge(e.from, e.to, false);
                deg[e.to]++;
            }

            for (int i = 0; i < V; i++)
            {
                if (was[i] == 0)
                {
                    boolean res = dfs(i);
                    if (!res)
                    {
                        out.println("Impossible");
                        return;
                    }
                }
            }
            StringBuilder res = bfs();
            for (int i = 0; i < 26; i++)
            {
                if (!alpha[i])
                {
                    res.append((char) (i + 'a'));
                }
            }
            out.println(res);
        }

        private StringBuilder bfs()
        {
            boolean[] seen = new boolean[V];
            LinkedList<Integer> q = new LinkedList<>();
            for (int i = 0; i < V; i++)
            {
                if (deg[i] == 0)
                {
                    q.add(i);
                    seen[i] = true;
                }
            }

            StringBuilder sb = new StringBuilder("");
            while (!q.isEmpty())
            {
                int U = q.pollFirst();
                char ch = map.getByID(U);
                alpha[ch - 'a'] = true;
                sb.append(ch);
                ArrayList<Integer> next = g.internalGraph[U];
                for (int i = 0; i < next.size(); i++)
                {
                    int v = next.get(i);
                    if (deg[v] == 0) continue;
                    deg[v]--;
                    if (deg[v] == 0)
                    {
                        q.add(v);
                    }
                }
            }
            return sb;
        }

        private boolean dfs(int u)
        {
            was[u] = VISITED;
            boolean res = true;
            ArrayList<Integer> next = g.internalGraph[u];
            for (int i = 0; i < next.size() && res; i++)
            {
                int v = next.get(i);
                if (was[v] == VISITED)
                {
                    return false;
                }
                if (was[v] == UNVISITED)
                {
                    res &= dfs(v);
                }
            }
            was[u] = RELAXED;
            return res;
        }

    }

    static class FastPrinter extends PrintWriter
    {
        public FastPrinter(OutputStream out)
        {
            super(out);
        }

        public FastPrinter(Writer out)
        {
            super(out);
        }

    }

    static class IntegerEdge implements Comparable<IntegerEdge>
    {
        public int from;
        public int to;
        public int cap;
        public IntegerEdge rev;

        public IntegerEdge(int from, int to)
        {
            this.from = from;
            this.to = to;
        }

        public IntegerEdge(int from, int to, int cap)
        {
            this.from = from;
            this.to = to;
            this.cap = cap;
        }

        public IntegerEdge(int from, int to, int cap, IntegerEdge rev)
        {
            this.from = from;
            this.to = to;
            this.cap = cap;
            this.rev = rev;
        }

        public int compareTo(IntegerEdge that)
        {
            int fromDiff = Integer.compare(this.from, that.from);
            return fromDiff != 0 ? fromDiff : Integer.compare(this.to, that.to);
        }

    }

    static class FastScanner
    {
        public BufferedReader br;
        public StringTokenizer st;

        public FastScanner(InputStream is)
        {
            br = new BufferedReader(new InputStreamReader(is));
        }

        public FastScanner(File f)
        {
            try
            {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e)
            {
                e.printStackTrace();
            }
        }

        public String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                String s = null;
                try
                {
                    s = br.readLine();
                } catch (IOException e)
                {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        public int nextInt()
        {
            return Integer.parseInt(next());
        }

    }

    static class IntegerGraph
    {
        public int V;
        public int startVertex;
        public int endVertex;
        public boolean[] was;
        public ArrayList[] internalGraph;

        public IntegerGraph(int V, int offset)
        {
            this.V = V;
            this.startVertex = offset;
            this.endVertex = offset + V - 1;

            was = new boolean[V + offset];
            internalGraph = new ArrayList[V + offset];
            for (int i = offset; i < V + offset; i++)
            {
                internalGraph[i] = new ArrayList<Integer>();
            }
        }

        public boolean addEdge(int from, int to, boolean bidirectional)
        {
            if (bidirectional)
            {
                internalGraph[to].add(from);
            }
            return internalGraph[from].add(to);
        }

    }

    static class NameMap<K>
    {
        public int now;
        public boolean isReverseMapRequired;
        public TreeMap<K, Integer> internalMap;
        public TreeMap<Integer, K> reverseInternalMap;

        public NameMap(boolean isReverseMapRequired)
        {
            now = 0;
            internalMap = new TreeMap<>();
            if (isReverseMapRequired)
            {
                this.isReverseMapRequired = isReverseMapRequired;
                reverseInternalMap = new TreeMap<>();
            }
        }

        public NameMap(int offset, boolean isReverseMapRequired)
        {
            now = offset;
            internalMap = new TreeMap<>();
            if (isReverseMapRequired)
            {
                this.isReverseMapRequired = isReverseMapRequired;
                reverseInternalMap = new TreeMap<>();
            }
        }

        public Integer put(K name)
        {
            Integer id = getByName(name);
            if (id == -1)
            {
                internalMap.put(name, now);
                if (isReverseMapRequired)
                {
                    reverseInternalMap.put(now, name);
                }
                now++;
                return now - 1;
            }
            return id;
        }

        public K getByID(int id)
        {
            K key = reverseInternalMap.get(id);
            return key;
        }

        public Integer getByName(K name)
        {
            Integer id = internalMap.get(name);
            return id == null ? -1 : id;
        }

        public Integer size()
        {
            return internalMap.size();
        }

    }
}