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.*;
import java.util.*;
import java.math.*;
@SuppressWarnings("unchecked")
public class DhakaJi {

    InputStream is;
    PrintWriter out;
    
    long mod = (long)(1e9 + 7), inf = (long)(3e18);
    private Stack<Integer> topoSort(ArrayList<Integer> []adjList,int n){
        boolean []visited=new boolean[26];
        Stack<Integer> st=new Stack<>();
        for(int i=0;i<26;i++){
            if(adjList[i].size()==0)
                continue ;
            if(!visited[i]){
                HashSet<Integer> hash=new HashSet<>();
                if(!topoSort(adjList,visited,hash,st,i)){
                    st.clear();
                    return st;
                }
            }
        }
        return st;
    }
    private boolean topoSort(ArrayList<Integer> []adjList,boolean []visited,HashSet<Integer> hash,Stack<Integer> st,int vertex){
        hash.add(vertex);
        for( int child : adjList[vertex]){
            if(hash.contains(child)){
                return false ;
            }
            if(visited[child])
                continue ;
            if(!topoSort(adjList,visited,hash,st,child))
                return false ;
        }
        hash.remove(vertex);
        visited[vertex]=true ;
        st.push(vertex);
        return true ;
    }
    void solve() {
        //SZ = sieve(); //SZ = 1000001;
        int n = ni();
        String []str=new String[n];
        // String []str=na();
        for(int i=0;i<n;i++)
            str[i]=ns();
        // if(n==1){
        //     for(int i=0;i<26;i++)
        //         out.print((char )('a'+i));            
        //     return ;
        // }
        ArrayList<Integer> []adjList=new ArrayList[26];
        boolean flag=true ;
        for(int i=0;i<26;i++)
            adjList[i]=new ArrayList<>();
        for(int i=0;i<n-1;i++){
            for(int j=0;j<str[i].length();j++){
                if(j>=str[i+1].length()){
                    out.println("Impossible");
                    return ;
                }

                if(str[i].charAt(j)!=str[i+1].charAt(j)){
                    flag=false ;
                    adjList[str[i].charAt(j)-'a'].add(str[i+1].charAt(j)-'a');
                    break ;
                }
            }
            // out.println(i);
        }
        if(flag){
            for(int i=0;i<26;i++)
                out.print((char )('a'+i));            
            return ;   
        }
        // for(int i=0;i<26;i++){
        //     out.print((char )(i+'a')+" -> ");
        //     for (int x : adjList[i]){
        //         out.print((char )(x+'a')+" , ");
        //     }
        //     out.println();
        // }
        // return ;
        // out.println("good");
        Stack<Integer> st=topoSort(adjList,n);
        if(st.isEmpty()){
            out.println("Impossible");
            return ;
        }
        HashSet<Character> hash=new HashSet<>();
        while(!st.isEmpty()){
            char c=(char )(st.pop()+'a');
            out.print(c);
            hash.add(c);            
        }
        for(int i=0;i<26;i++){
            if(!hash.contains((char )('a'+i))){
                out.print((char )('a'+i));
            }
        }


    }
    
    //--------- Extra Template -----------
    boolean isPrime(long n) {
        if(n <= 1)  return false;
        if(n <= 3)   return true;
        if(n%2 == 0 || n%3 == 0)    return false;
        for(long i = 5; i * i <= n; i += 6) {
            if(n % i == 0 || n % (i + 2) == 0)  return false;
        }
        return true;
    }

    int P[], S[], SZ, NP = 15485900;
    boolean isP[];    

    int sieve() {
        int i, j, n = NP; 
        isP = new boolean[n]; 
        S = new int[n];
        for(i = 3; i < n; i += 2) {
            isP[i] = true;
            S[i-1] = 2;
            S[i] = i;
        }
        isP[2] = true;
        S[1] = 1;   //(UD)
        for(i = 3; i * i <= n; i += 2) {
            if( !isP[i] )   continue;
            for(j = i * i; j < n; j += i) {
                isP[j] = false;
                if(S[j] == j)   S[j] = i;
            }
        }
        P = new int[n];
        P[0] = 2;
        j = 1;
        for(i = 3; i < n; i += 2) {
            if ( isP[i] )   P[j++] = i;
        }
        P = Arrays.copyOf(P, j);
        return j;
    }

    long mp(long b, long e, long mod) {
        b %= mod;
        long r = 1;
        while(e > 0) {
            if((e & 1) == 1) {
                r *= b; r %= mod;
            }
            b *= b; b %= mod;
            e >>= 1;
        }
        return r;
    }

    //---------- I/O Template ----------
    
    public static void main(String[] args) throws Exception { new DhakaJi().run(); }
    void run() throws Exception { 
        is = System.in; 
        out = new PrintWriter(System.out);
        long s = System.currentTimeMillis();
        solve();
        out.flush();
        // tr((System.currentTimeMillis()-s)/1000+"s");
    }
    
    byte input[] = new byte[1024];
    int len = 0, ptr = 0;
    
    int readByte() { 
        if(ptr >= len) { ptr = 0; 
            try { len = is.read(input); } 
            catch(IOException e) { throw new InputMismatchException(); } 
            if(len <= 0) { return -1; } 
        } return input[ptr++];
    }
    boolean isSpaceChar(int c) { return !( c >= 33 && c <= 126 ); }
    int skip() { 
        int b = readByte(); 
        while(b != -1 && isSpaceChar(b)) { b = readByte(); } 
        return b;
    }
    
    char nc() { return (char)skip(); }
    String ns() { 
        int b = skip(); 
        StringBuilder sb = new StringBuilder(); 
        while(!isSpaceChar(b)) { sb.appendCodePoint(b); b = readByte(); } 
        return sb.toString();
    }
    String nLine() { 
        int b = skip(); 
        StringBuilder sb = new StringBuilder(); 
        while( !(isSpaceChar(b) && b != ' ') ) { sb.appendCodePoint(b); b = readByte(); } 
        return sb.toString();
    }
    int ni() { 
        int n = 0, b = readByte(); 
        boolean minus = false; 
        while(b != -1 && !( (b >= '0' && b <= '9') || b == '-')) { b = readByte(); } 
        if(b == '-') { minus = true; b = readByte(); } 
        if(b == -1) { return -1; }  //no input 
        while(b >= '0' && b <= '9') { n = n * 10 + (b - '0'); b = readByte(); } 
        return minus ? -n : n;
    }
    long nl() { 
        long n = 0L;    int b = readByte(); 
        boolean minus = false; 
        while(b != -1 && !( (b >= '0' && b <= '9') || b == '-')) { b = readByte(); } 
        if(b == '-') { minus = true; b = readByte(); } 
        while(b >= '0' && b <= '9') { n = n * 10 + (b - '0'); b = readByte(); } 
        return minus ? -n : n;
    }
    double nd() { return Double.parseDouble(ns()); }
    float nf() { return Float.parseFloat(ns()); }
    int[] na(int n) { 
        int a[] = new int[n]; 
        for(int i = 0; i < n; i++) { a[i] = ni(); } 
        return a;
    }
    char[] ns(int n) { 
        char c[] = new char[n]; 
        int i, b = skip(); 
        for(i = 0; i < n; i++) { 
            if(isSpaceChar(b)) { break; } 
            c[i] = (char)b; b = readByte(); 
        } return i == n ? c : Arrays.copyOf(c,i);
    }
    private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
    private void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}