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.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.LinkedList;

public class CF1_290A {
    
    static Reader sc = new Reader();
    static PrintWriter out = new PrintWriter(System.out);
    
    static LinkedList<Character> order;
    static boolean bad;
    
    static boolean fix(String act, String next) {
        for (int i = 0; i < Math.min(act.length(),next.length()); i++) {
            if(act.charAt(i) != next.charAt(i)) {
                if(fixChar(act.charAt(i), next.charAt(i)))
                    return true;
                return false;
            }
        }
        if(next.length() < act.length()) {
            bad = true;
            return true;
        }
        return false;
    }
    
    static boolean fixChar(char act, char next) {
        int posAct = 0;
        int posNext = 0;
        
        int i = 0;
        for (char c : order) {
            if(c == act)
                posAct = i;
            if(c == next)
                posNext = i;
            i++;
        }
        if(posAct > posNext) {
            order.remove((Character)next);
            order.add(posAct,next);
            return true;
        }
        
        return false;
    }
    
    
    public static void main(String[] args) throws IOException {
        
        order = new LinkedList<Character>();
        bad = false;
        
        for (int i = 0; i < 26; i++)
            order.add((char)('a' + i));

        int n = sc.nextInt();
        String[] names  = new String[n];
        
        for (int i = 0; i < n; i++) {
            names[i] = sc.next();
        }
        
        for (int k = 0; k < 2; k++) {
            for (int i = 0; i < n; i++) {
                String act = names[i];
                
                for (int j = i+1; j < n; j++) {
                    fix(act, names[j]);
                }
            }
        }

        
        for (int i = 0; i < n; i++) {
            String act = names[i];
            
            for (int j = i+1; j < n; j++) {
                if(fix(act, names[j])) {
                    bad = true;
                }
            }
        }
        
        if(bad) {
            out.println("Impossible");
            out.close();
            return;
        } else {
            print(order);
            out.close();
            return;
        }
        
    }
    
    static class Reader {
        final private int BUFFER_SIZE = 1 << 12;private byte[] buffer;private int bufferPointer, bytesRead;
        public Reader(){buffer=new byte[BUFFER_SIZE];bufferPointer=bytesRead=0;
        }private void fillBuffer() throws IOException{bytesRead=System.in.read(buffer,bufferPointer=0,BUFFER_SIZE);if(bytesRead==-1)buffer[0]=-1;
        }private byte read() throws IOException{if(bufferPointer==bytesRead)fillBuffer();return buffer[bufferPointer++];
        }public String next() throws IOException{StringBuilder sb = new StringBuilder();byte c;while((c=read())<=' '){if(c==-1) return null;};do{sb.append((char)c);}while((c=read())>' ');if (sb.length()==0) return null;return sb.toString();
        }public String nextLine() throws IOException{StringBuilder sb = new StringBuilder();byte c;boolean read = false;while((c=read())!=-1){if(c=='\n') {read = true;break;}if(c>=' ')sb.append((char)c);}if (!read) return null;return sb.toString();
        }public int nextInt() throws IOException{int ret=0;byte c=read();while(c<=' ')c=read();boolean neg=(c=='-');if(neg)c=read();do{ret=ret*10+c-'0';}while((c=read())>='0'&&c<='9');if(neg)return -ret;return ret;
        }public long nextLong() throws IOException{long ret=0;byte c=read();while(c<=' ')c=read();boolean neg=(c=='-');if(neg)c=read();do{ret=ret*10L+c-'0';}while((c=read())>='0'&&c<='9');if(neg)return -ret;return ret;
        }public double nextDouble() throws IOException{double ret=0,div=1;byte c=read();while(c<=' ')c=read();boolean neg=(c=='-');if(neg)c = read();do {ret=ret*10+c-'0';}while((c=read())>='0'&&c<='9');if(c=='.')while((c=read())>='0'&&c<='9')ret+=(c-'0')/(div*=10);if(neg)return -ret;return ret;
        }public int[] na(int n) throws IOException{int[] a = new int[n];for(int i = 0;i < n;i++)a[i] = nextInt();return a;
        }public char[][] ncha(int n) throws IOException{char[][] a = new char[n][];for(int i = 0;i < n;i++)a[i] = next().toCharArray();return a;
        }public int[][] nm(int n, int m) throws IOException{int[][] map = new int[n][m];for(int i = 0;i < n;i++)map[i] = na(m);return map;
        }public void close() throws IOException{if(System.in==null) return;System.in.close();}
    }
    
    static void print(int[] A) {for(int i=0;i<A.length;i++){if(i!=0) out.print(' ');out.print(A[i]);}out.println();}
    static <T> void print(Iterable<T> A) {int i = 0;for(T act : A){out.print(act);i++;}out.println();}
    static void printPlus1(Iterable<Number> A) {int i = 0;for(Number act : A){if(i!=0)out.print(' ');out.print(act.longValue() + 1L);i++;}out.println();}
    static void debug(Object... o) { System.err.println(Arrays.deepToString(o)); }
    
    /*
    long s = System.currentTimeMillis();
    debug(System.currentTimeMillis()-s+"ms");
     */
}