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 m = (int)(1e9+7);
//	static long mod(long x) {
//		return ((x%m + m)%m);
//	}
//	static long add(long a,long b) {
//		return mod(mod(a)+mod(b));
//	}
//	static long mul(long a,long b) {
//		return mod(mod(a) * mod(b));
//	}
	public static void main (String[] args) {
		FastReader sc = new FastReader();
		int t = 1;
//    	t = sc.nextInt();
    	while(t-->0) {
    		int n = sc.nextInt();
    		String s[] = new String[n];
    		for(int i=0;i<n;i++) s[i] = sc.next();
    		
    		foxAndNames(s);
    	}
	}
	private static void foxAndNames(String[] s) {
		List<Integer> g[] = new ArrayList[26];
		for(int i=0;i<26;i++) g[i] = new ArrayList<>();
		int n = s.length;
		
		for(int i=0;i<n-1;i++) {
			String s1 = s[i];
			String s2 = s[i+1];
			for(int j=0;j<s1.length();j++) {
				if(j == s2.length()) {
					System.out.println("Impossible");
					return;
				}
				if(s1.charAt(j)!=s2.charAt(j)) {
					g[s1.charAt(j)-'a'].add(s2.charAt(j)-'a');
					break;
				}
			}
		}
		Stack<Integer> sta = new Stack<>();
		boolean vis[] = new boolean[26];
		boolean cur[] = new boolean[26];
		boolean flag = false;
		for(int i=0;i<26;i++) {
			if(!vis[i]) flag|=dfs(i,g,vis,cur);
		}
		if(flag) {
			System.out.println("Impossible");
			return;
		}
		Arrays.fill(vis, false);
		for(int i=0;i<26;i++) {
			if(!vis[i]) topo(g,i,vis,sta);
		}
		StringBuilder string = new StringBuilder();
		while(!sta.isEmpty()) {
			char c = (char) (sta.pop() + 'a');
			string.append(c);
		}
		System.out.println(string);
	}
	static boolean dfs(int node, List<Integer>[] g, boolean[] vis, boolean[] cur) {
		vis[node] = true;
		cur[node] = true;
		for(int adj : g[node]) {
			if(!vis[adj]) {
				if(dfs(adj,g,vis,cur)) return true;
			}
			else if(cur[adj]) return true;
		}
		
		cur[node] = false;
		return false;
	}
	static void topo(List<Integer>[] g, int node, boolean[] vis, Stack<Integer> sta) {
		vis[node] = true;
		
		for(int adj : g[node]) {
			if(!vis[adj]) topo(g,adj,vis,sta);
		}
		sta.add(node);
	}
//	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>{
	double a;
	int b;
	pair(double a,int b){
		this.a = a;
		this.b = b;
	}
	@Override
	public int compareTo(pair o) {
		// TODO Auto-generated method stub
		return (int) (o.b - this.b);
	}
}
class spair{
	pair p;
	int id;
	spair(pair p,int id){
		this.p = p;
		this.id = id;
	}
}