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.*;
 
public class Main {
	static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 

        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 

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

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

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

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

        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    }
	static int mod = (int)(1e9+7);
//	static int n,m,res[];
//	static int[] moves[] = {new int[] {-1,0},new int[] {1,0},new int[] {0,1},new int[] {0,-1}};
	static List<Integer> ans = new ArrayList<>();
	public static void main (String[] args) throws Exception {
		FastReader sc = new FastReader();
        PrintWriter out = new PrintWriter(System.out);
//        int t = sc.nextInt();
        int t = 1;
        while(t-->0) {
			int n = sc.nextInt();
			String s[] = new String[n];
			for(int i=0;i<n;i++) {
				String str = sc.next();
				s[i] = str;
			}
			List<Integer> g[] = new ArrayList[26];
			for(int i=0;i<26;i++)
				g[i] = new ArrayList<>();
			boolean flag = false;
			for(int i=1;i<n;i++) {
				String s1 = s[i-1];
				String s2 = s[i];
				int sz = Math.min(s2.length(), s1.length());
				boolean is = true;
				for(int j=0;j<sz;j++) {
					if(s1.charAt(j) != s2.charAt(j)) {
						g[s1.charAt(j)-'a'].add(s2.charAt(j)-'a');
						is = false;
						break;
					}
				}
				if(is && s2.length()<s1.length()) {
					flag = true;
					break;
				}
			}
			if(flag) {
				out.write("Impossible");
				out.close();
				break;
			}
			Stack<Integer> st = new Stack<>();
			boolean vis[] = new boolean[26];
			boolean cur[] = new boolean[26];
			for(int i=0;i<26;i++) {
				if(!vis[i]) {
					if(dfs(i,g,vis,cur,st)) {
						flag = true;
						break;
					}
				}
			}
			if(flag) {
				out.write("Impossible");
				out.close();
				break;
			}
			List<Integer> ans = new ArrayList<>();
			while(!st.isEmpty()) {
				ans.add(st.pop());
			}
			for(int i=0;i<ans.size();i++) {
				out.write((char)(ans.get(i)+'a')+"");
			}
        }
		out.close();
	}
	private static boolean dfs(int node,List<Integer>[] g, boolean[] vis, boolean[] cur, Stack<Integer> s) {
		vis[node] = true;
		cur[node] = true;
		for(int adj : g[node]) {
			if(!vis[adj]) {
				if(dfs(adj,g,vis,cur,s))
					return true;
			}
			else if(cur[adj]) {
				return true;
			}
			
		}
		s.push(node);
		cur[node] = false;
		return false;
	}
	private static boolean isvalid(int x, int y, int g[][]) {
		int n = g.length;
		int m = g[0].length;
		if(x<0 || y<0 || x>=n || y>=m) return false;
		return true;
	}
//	private static long pow(long i, long j) {
//		long ans = 1;
//		while(j>0) {
//			if(j%2==0) {
//				i = (i*i)%m;
//				j/=2;
//			}
//			else {
//				ans = (ans*i)%m;
//				j--;
//			}
//		}
//		return ans;
//	}
	private static int ub(List<Long> list, long l) {
		int lo = 0,h = list.size()-1;
		int ans = -1;
		while(lo<=h) {
			int mid = lo+(h-lo)/2;
			if(list.get(mid)<=l) {
				lo = mid+1;
				ans = mid;
			}
			else {
				
				h = mid-1;
			}
		}
		
		return ans+1;
	}
	private static long lb(List<Long> list, long l) {
		int lo = 0,h = list.size()-1;
		int ans = -1;
		while(lo<=h) {
			int mid = lo+(h-lo)/2;
			if(list.get(mid)<=l) {
				if(mid>0 && list.get(mid-1)==l) h = mid - 1;
				else {
					lo = mid+1;
					ans = mid;
				}
			}
			else {
				h = mid-1;
			}
		}
		if(list.get(ans)==l) return ans;
		return ans+1;
	}
	private static void swap(int[] a, int i, int j) {
		int temp = a[i];
		a[i] = a[j];
		a[j] = temp;
	}
	static long lstbt(long val) {
		long msk = val & (val-1);
		return (long) (Math.log(val^msk)/Math.log(2));
	}
	private static long sqrt(long x) {
		long l = 1,h = x;
		long ans = 0;
		while(l<=h) {
			long mid = (l+(h-l)/2);
			if(mid>x/mid) h = mid-1;
			else {
				ans = mid;
				l = mid+1;
			}
		}
		return ans;
	}
	static boolean prime[] = new boolean[10000001];
	static void sieve() {
		prime[0] = true;
		prime[1] = true;
		int max = 10000000;
		for(int i=2;i*i<=max;i++) {
			if(!prime[i]) {
				for(int j=i*i;j<=max;j+=i)
					prime[j] = true;
			}
		}
	}
	static String reverse(String x) {
		StringBuilder input1 = new StringBuilder();
		
        input1.append(x);
        
        input1 = input1.reverse();
        
        return input1.toString();
	}
	static int gcd(int val, int g) {
 
		if(g==0) return val;
		
		return gcd(g,val%g);
	}
	static int lcm(int a,int b) {
		return (a*b)/gcd(a,b);
	}
}
 
class pair implements Comparable<pair>{
	long a;
	int b;
	pair(long a,int b){
		this.a = a;
		this.b = b;
	}
	@Override
	public int compareTo(pair o) {
		// TODO Auto-generated method stub
		return (int) (this.a - o.a);
	}
}
class spair{
	pair p;
	int id;
	spair(pair p,int id){
		this.p = p;
		this.id = id;
	}
}