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 com.sun.org.apache.xerces.internal.util.SynchronizedSymbolTable;
import jdk.management.cmm.SystemResourcePressureMXBean;

import java.awt.*;
import java.io.*;
import java.lang.reflect.Array;
import java.util.*;
import java.util.List;

public class Newbie {

    static InputReader sc = new InputReader(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        solver s = new solver();
        int t = 1;
        while (t > 0) {
            s.solve();
            t--;
        }
    }

    static class descend implements Comparator<pair1> {
        public int compare(pair1 o1, pair1 o2) {
            if (o1.pop != o2.pop)
                return (int) (o1.pop - o2.pop);
            else
                return o1.in - o2.in;
        }
    }

    static class InputReader {
        public BufferedReader br;
        public StringTokenizer token;

        public InputReader(InputStream stream) {
            br = new BufferedReader(new InputStreamReader(stream), 32768);
            token = null;
        }

        public String next() {
            while (token == null || !token.hasMoreTokens()) {
                try {
                    token = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return token.nextToken();
        }

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

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }
    }

    static class card {
        long a;
        int cnt;
        int i;

        public card(long a, int cnt, int i) {
            this.a = a;
            this.cnt = cnt;
            this.i = i;
        }
    }

    static class ascend implements Comparator<pair> {
        public int compare(pair o1, pair o2) {
            if (o1.a != o2.a)
                return (int) (o1.a - o2.a);
            else
                return (o1.val - o2.val) * -1;
        }
    }

    static class extra {

        static boolean v[] = new boolean[100001];
        static List<Integer> l = new ArrayList<>();
        static int t;

        static void shuffle(long a[]) {
            List<Long> l = new ArrayList<>();
            for (int i = 0; i < a.length; i++)
                l.add(a[i]);
            Collections.shuffle(l);
            for (int i = 0; i < a.length; i++)
                a[i] = l.get(i);
        }

        static long gcd(long a, long b) {
            if (b == 0)
                return a;
            else
                return gcd(b, a % b);
        }

        static boolean valid(int i, int j, int r, int c) {
            if (i >= 0 && i < r && j >= 0 && j < c)
                return true;
            else
                return false;
        }

        static void seive() {
            for (int i = 2; i < 100001; i++) {
                if (!v[i]) {
                    t++;
                    l.add(i);
                    for (int j = 2 * i; j < 100001; j += i)
                        v[j] = true;
                }
            }
        }

        static int binary(long a[], long val, int n) {
            int mid = 0, l = 0, r = n - 1, ans = 0;
            while (l <= r) {
                mid = (l + r) >> 1;
                if (a[mid] == val) {
                    r = mid - 1;
                    ans = mid;
                } else if (a[mid] > val)
                    r = mid - 1;
                else {
                    l = mid + 1;
                    ans = l;
                }
            }
            return (ans + 1);
        }

        static long fastexpo(int x, int y) {
            long res = 1;
            while (y > 0) {
                if ((y & 1) == 1) {
                    res *= x;
                }
                y = y >> 1;
                x = x * x;
            }
            return res;
        }

        static long lfastexpo(int x, int y, int p) {
            long res = 1;
            x = x % p;
            while (y > 0) {
                if ((y & 1) == 1) {
                    res = (res * x) % p;
                }
                y = y >> 1;
                x = (x * x) % p;
            }
            return res;
        }
    }

    static class pair {
        long a;
        int i;
        int val;

        public pair(long a, int i, int val) {
            this.a = a;
            this.i = i;
            this.val = val;
        }
    }

    static class pair1 {
        long pop;
        int in;

        public pair1(long a, int n) {
            this.pop = a;
            this.in = n;
        }
    }

    static long m = (long) 1e9 + 7;

    static class solver {
        boolean vis[] = new boolean[125];
        int e[][]=new int[27][27];
        int getID(char c)
        {
            if(c == ' ') return 0;
            return c - 'a'+1;
        }
        void solve() {
            for(int i = 1; i <= 26; i++)
                e[0][i] =1;
            int n = sc.nextInt();
            List<Character> l[] = new ArrayList[125];
            for (int i = 0; i < 125; i++) {
                l[i] = new ArrayList<>();
            }
            char u = ' ', v = ' ';
            String pre = "";
            String st[]=new String[n+1];
            for (int i = 1; i <=n; i++) {
                String s = sc.next();
                st[i]=s+" ";
                if (i == 1) {
                    u = s.charAt(0);
                    pre = s;
                } else {
                    v = s.charAt(0);
                    if (u != v) {
                        l[u].add(v);
                        pre = s;
                        u = v;
                    } else {
                        if (s.length() < pre.length() && s.equals(pre.substring(0, s.length()))) {
                            System.out.println("Impossible");
                            return;
                        }
                        for (int j = 0; j < pre.length(); j++) {
                            if (pre.charAt(j) != s.charAt(j)) {
                                l[pre.charAt(j)].add(s.charAt(j));
                                u = s.charAt(0);
                                break;
                            }
                        }
                        pre = s;
                    }
                }
            }
          /* for (char i = 'a'; i <= 'z'; i++) {
             for(int j=0;j<l[i].size();j++)
                 System.out.println(i+" "+l[i].get(j));
            }*/
            for(int i = 1; i < n; i++)
            {
                int pos = 0;
                while(st[i].charAt(pos) == st[i+1].charAt(pos)) {
                    pos++;
                }
                e[getID(st[i].charAt(pos))][getID(st[i+1].charAt(pos))] = 1;
            }
            for(int k = 0; k <= 26; k++)
                for(int i = 0; i <= 26; i++)
                    for(int j = 0; j <= 26; j++)
                        e[i][j] |= e[i][k] & e[k][j];
            int  haveCycle = 0;
            for(int i = 0; i <= 26; i++)
                haveCycle |= e[i][i];
            if(haveCycle>0)
            {
                System.out.println("Impossible");
                System.exit(0);
            }
           Stack<Character> s = new Stack<>();
            for (char i = 'a'; i <= 'z'; i++) {
                if (!vis[i] && l[i].size() > 0) {
                    topo(i, l, s);
                }
            }
            int c[] = new int[26];
            while (!s.isEmpty()) {
                c[s.peek() - 'a'] = 1;
                System.out.print(s.pop());
            }
            for (char i = 'a'; i <= 'z'; i++) {
                if (c[i - 'a'] != 1)
                    System.out.print(i);
            }
            System.out.println();
        }
        void topo(char s, List<Character> l[], Stack<Character> stack) {
            if (!vis[s]) {
                vis[s] = true;
                for (int i = 0; i < l[s].size(); i++) {
                    if (!vis[l[s].get(i)]) {
                        topo(l[s].get(i), l, stack);
                    }
                }
                stack.push(s);
            }
        }
    }
}