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.LinkedList;
import java.util.Queue;

public class P510C {
    private static class HpReader {
        private BufferedReader in;

        public HpReader(String dir, String inFile, String outFile) {
            initAndRedirectInOut(dir, inFile, outFile);
        }

        private int ivl(String val) {
            return Integer.parseInt(val);
        }

        private long lvl(String val) {
            return Long.parseLong(val);
        }

        private void initAndRedirectInOut(String dir, String inFile, String outFile) {
            if (dir != null) {
                try {
                    String containingDirPath = dir.endsWith(File.separator) ? dir : dir + File.separator;
                    if (isDebug && inFile != null) System.setIn(new FileInputStream(new File(containingDirPath + inFile)));
                    if (isDebug && outFile != null) System.setOut(new PrintStream(new File(containingDirPath + outFile)));
                } catch (FileNotFoundException e) {
                    // Do nothing, stdin & stdout are not redirected
                }
            }
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }

        private String nextSingleStr() throws IOException {
            return in.readLine();
        }

        private String[] nextLineStr() throws IOException {
            return nextLineStr(0);
        }

        private String[] nextLineStr(int offset) throws IOException {
            String[] inp = nextSingleStr().split(" ");
            String[] rs = new String[offset + inp.length];
            System.arraycopy(inp, 0, rs, offset, inp.length);
            return rs;
        }

        private int nextSingleInt() throws IOException {
            return ivl(in.readLine());
        }

        private int[] nextLineInt() throws IOException {
            return nextLineInt(0);
        }

        private int[] nextLineInt(int offset) throws IOException {
            String[] inp = nextLineStr();
            int[] rs = new int[offset + inp.length];
            for (int i = 0; i < inp.length; i++) rs[offset + i] = ivl(inp[i]);
            return rs;
        }

        private long nextSingleLong() throws IOException {
            return lvl(in.readLine());
        }

        private long[] nextLineLong() throws IOException {
            return nextLineLong(0);
        }

        private long[] nextLineLong(int offset) throws IOException {
            String[] inp = nextLineStr();
            long[] rs = new long[offset + inp.length];
            for (int i = 0; i < inp.length; i++) rs[offset + i] = lvl(inp[i]);
            return rs;
        }

        private int[][] nextMatInt(int lineCount) throws IOException {
            return nextMatInt(lineCount, 0, 0);
        }

        private int[][] nextMatInt(int lineCount, int rowOffset, int colOffset) throws IOException {
            int[][] rs = new int[rowOffset + lineCount][];
            for (int i = rowOffset; i < rs.length; i++) rs[i] = nextLineInt(colOffset);
            return rs;
        }
    }

    private static class HpHelper {
        private static final String LOCAL_DEBUG_FLAG = "COM_PROG_DEBUG";

        private static boolean isDebug() {
            try {
                return Boolean.parseBoolean(System.getenv(HpHelper.LOCAL_DEBUG_FLAG));
            } catch (Exception e) {
                return false;
            }
        }

        private static String createDelimiter(String delimiter) {
            return delimiter == null ? " " : delimiter;
        }

        private static void println(int[] data, String delimiter) {
            delimiter = createDelimiter(delimiter);
            for (int t : data) out.print(t + delimiter);
            out.println();
        }

        private static void println(long[] data, String delimiter) {
            delimiter = createDelimiter(delimiter);
            for (long t : data) out.print(t + delimiter);
            out.println();
        }

        private static <T> void println(T[] data, String delimiter) {
            delimiter = createDelimiter(delimiter);
            for (T t : data) {
                if (t instanceof int[]) {
                    println((int[]) t, delimiter);
                } else if (t instanceof long[]) {
                    println((long[]) t, delimiter);
                } else if (t instanceof Object[]) {
                    println((Object[]) t, delimiter);
                } else {
                    out.print(t + delimiter);
                }
            }
            out.println();
        }
    }

    private static boolean isDebug = HpHelper.isDebug();
    private static HpReader in = new HpReader("/Users/apple/Work/WorkSpaces/CompetitiveProg/", "in.txt", null);
    private static PrintWriter out;

    private static int ord(char c) {
        return c - 'a';
    }

    public static void main(String[] args) throws IOException {
        int n = in.nextSingleInt(), edgeCount = 0, edgeRemoved = 0;
        String data[] = new String[n];
        for (int i = 0; i < n; i++) {
            data[i] = in.nextSingleStr();
        }

        int[] inOrder = new int[26];
        boolean[][] connected = new boolean[26][26];
        BUILD_PATH:
        for (int i = 1; i < n; i++) {
            String s1 = data[i - 1], s2 = data[i];
            for (int j = 0; j < Math.min(s1.length(), s2.length()); j++) {
                if (s1.charAt(j) != s2.charAt(j)) {
                    if (!connected[ord(s1.charAt(j))][ord(s2.charAt(j))]) {
                        connected[ord(s1.charAt(j))][ord(s2.charAt(j))] = true;
                        inOrder[ord(s2.charAt(j))]++;
                        edgeCount++;
                    } 
                    continue BUILD_PATH;
                }
            }
            if (s1.length() > s2.length()) {
                out.println("Impossible");
                out.flush();
                return;
            }
        }

        Queue<Integer> topoOrder = new LinkedList<>();
        Queue<Integer> orderZeroVertex = new LinkedList<>();
        for (int i = 0; i < 26; i++) {
            if (inOrder[i] == 0) {
                orderZeroVertex.add(i);
            }
        }

        while (!orderZeroVertex.isEmpty()) {
            int node = orderZeroVertex.poll();
            topoOrder.add(node);
            for (int i = 0; i < 26; i++) {
                if (connected[node][i]) {
                    connected[node][i] = false;
                    inOrder[i]--;
                    edgeRemoved++;
                    if (inOrder[i] == 0) {
                        orderZeroVertex.add(i);
                    }
                }
            }
        }

        if (edgeRemoved < edgeCount) {
            out.println("Impossible");
            out.flush();
            return;
        }

        while (!topoOrder.isEmpty()) {
            out.print((char) ('a' + topoOrder.poll()));
        }

        out.flush();
    }
}