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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7, N = 26;
const long long inf = 1e18;
namespace uchiha {
template <class T>
using v = vector<T>;
template <class T>
using vv = vector<vector<T>>;
template <class T, class U>
using p = pair<T, U>;
template <class T, class U>
using m = map<T, U>;
template <class T>
using pri = priority_queue<T>;
template <class T>
using rpi = priority_queue<T, v<T>, greater<T>>;
using vc = v<char>;
using vs = v<string>;
using vd = v<long double>;
using vvi = vector<vector<long long>>;
using vvb = vector<vector<bool>>;
template <class T>
void rd(T& a) {
  cin >> a;
}
template <class T>
void rd(v<T>& a) {
  for (long long i = 0; i < (long long)(long long)a.size(); i++) cin >> a[i];
}
template <class T>
void rd(vv<T>& a) {
  for (long long i = 0; i < (long long)(long long)a.size(); i++) rd(a[i]);
}
template <class T, class U>
void rd(pair<T, U>& p) {
  cin >> p.first >> p.second;
}
template <class T, class... Args>
void rd(T& a, Args&... args) {
  cin >> a;
  rd(args...);
}
template <class T>
void print(T a) {
  cout << a << endl;
}
template <class T>
void print(v<T> a) {
  for (auto x : a) {
    cout << x << ' ';
  }
  cout << endl;
}
template <class T>
void print(vv<T> a) {
  for (auto x : a) {
    print(x);
  }
}
template <class T, class U>
void print(pair<T, U> p) {
  cout << p.first << ' ' << p.second << endl;
}
template <class T>
void print(set<T> s) {
  for (auto it = s.begin(); it != s.end(); it++) {
    cout << (*it) << ' ';
  }
  cout << endl;
}
template <class T, class... Args>
void print(T a, Args... args) {
  cout << a << ' ';
  print(args...);
}
long long mintwo(long long x) { return __builtin_ctzll(x); }
long long maxtwo(long long x) { return (long long)log2(x); }
long long onebits(long long x) { return __builtin_popcountll(x); }
long long ceil(long long a, long long b) { return (a + b - 1) / b; }
void madd(long long& a, long long b) { a = (a + b) % mod; }
void msub(long long& a, long long b) {
  a -= b;
  if (a < 0) a += mod;
}
void mmul(long long& a, long long b) { a = (a * 1ll * b) % mod; }
void yes() { cout << "YES" << endl; }
void no() { cout << "NO" << endl; }
void subl() {}
template <class T, class U>
long double pdiv(T a, U b) {
  return (1.0 * a) / (1.0 * b);
}
template <class T, class U>
void chmin(T& a, U b) {
  if (a > b) a = b;
}
template <class T, class U>
void chmax(T& a, U b) {
  if (a < b) a = b;
}
template <class T, class U>
T min(T a, U b) {
  if (a > b) a = b;
  return a;
}
template <class T, class U>
T max(T a, U b) {
  if (a < b) a = b;
  return a;
}
template <class T>
T min(v<T> a) {
  return *min_element((a).begin(), (a).end());
}
template <class T>
T max(v<T> a) {
  return *max_element((a).begin(), (a).end());
}
template <class T>
T sum(v<T> a) {
  T su = 0;
  for (auto x : a) su = (su + x);
  return su;
}
template <class T, class U>
T POW(T x, U y) {
  T a = 1;
  while (y) {
    if (y & 1) a = (a * x) % mod;
    x = (x * 1ll * x) % mod;
    y >>= 1;
  }
  return a;
}
template <class T>
v<T> pre_sum(v<T> a) {
  for (long long i = 1;
       (1 - (long long)a.size() < 0) ? i < (long long)(long long)a.size()
                                     : i > (long long)(long long)a.size();
       (1 - (long long)a.size() < 0) ? i++ : i--)
    a[i] = (a[i] + a[i - 1]);
  return a;
}
template <class T>
v<T> suf_sum(v<T> a) {
  for (long long i = (long long)a.size() - 2;
       ((long long)a.size() - 2 - -1 < 0) ? i < (long long)-1
                                          : i > (long long)-1;
       ((long long)a.size() - 2 - -1 < 0) ? i++ : i--)
    a[i] = (a[i] + a[i + 1]);
  return a;
}
vector<long long> Finv, Ninv;
void factfill(vector<long long>& fact, long long n) {
  fact.assign(n + 1, 1);
  Ninv = fact;
  Finv = fact;
  for (long long i = 2; i <= n; i++) fact[i] = (fact[i - 1] * i) % mod;
  for (long long i = 2; i <= n; i++)
    Ninv[i] = Ninv[mod % i] * (mod - mod / i) % mod;
  for (long long i = 2; i <= n; i++) Finv[i] = (Ninv[i] * Finv[i - 1]) % mod;
}
void sieve(vector<long long>& primes, long long n) {
  primes.resize(n + 1, 0ll);
  primes[1] = 1;
  long long p = 2;
  for (; p * p <= n; p++) {
    if (!primes[p]) {
      primes[p] = p;
      for (long long q = p * p; q < n + 1; q += p) primes[q] = p;
    }
  }
  for (; p <= n; p++)
    if (!primes[p]) primes[p] = p;
}
long double _c = clock();
inline bool tle() {
  bool b = (((clock() - _c) / CLOCKS_PER_SEC) > 3);
  if (b) cerr << "TLE";
  return b;
}
}  // namespace uchiha
using namespace uchiha;
void mangekyo();
bool flag = 0;
vv<long long> adj(N + 1);
void fun(vs inp) {
  if (flag) return;
  vc start;
  vs finish = inp;
  long long n = (long long)((inp).size());
  for (long long i = 0; i < (long long)n; i++) {
    if (inp[i].empty()) return;
    start.push_back(inp[i][0]);
  }
  for (long long i = 1; i < (long long)n; i++) {
    if (inp[i - 1].size() > inp[i].size()) {
      string r = inp[i - 1];
      string t = inp[i];
      if (r.substr(0, (long long)((t).size())) == t) {
        flag = 1;
        return;
      }
    }
  }
  for (long long i = 0; i < (long long)n; i++) {
    finish[i].erase(((finish[i]).begin() + 0), ((finish[i]).begin() + 1));
  }
  string uni = "";
  for (long long i = 0; i < (long long)n; i++) {
    if (uni.empty()) {
      uni += start[i];
      continue;
    }
    if (uni.back() == start[i]) continue;
    uni += start[i];
  }
  set<char> st;
  for (long long i = 0; i < (long long)(long long)((uni).size()); i++) {
    if (st.find(uni[i]) != st.end()) {
      flag = 1;
      return;
    }
    st.insert(uni[i]);
  }
  for (long long i = 1; i < (long long)uni.size(); i++) {
    adj[uni[i - 1] - '`'].push_back(uni[i] - '`');
  }
  vv<string> cache(N + 1);
  for (long long i = 0; i < (long long)(long long)((start).size()); i++) {
    cache[start[i] - '`'].push_back(finish[i]);
  }
  for (auto v : cache) {
    if ((long long)((v).size()) < 2) continue;
    fun(v);
    if (flag) return;
  }
}
vector<long long> color(N + 1);
vector<bool> vis(N + 1);
bool Dfs(long long u) {
  color[u] = 1;
  for (auto v : adj[u]) {
    if (color[v] == 0) {
      if (Dfs(v)) return 1;
    } else if (color[v] == 1) {
      flag = 1;
      return 1;
    }
  }
  color[u] = 2;
  return 0;
}
bool cyclic() {
  color.assign(N + 1, 0);
  for (long long i = 0; i < (long long)N + 1; i++) {
    if (color[i] == 0 && Dfs(i)) break;
  }
  return flag;
}
string path = "";
void dfs(long long u) {
  vis[u] = 1;
  for (auto v : adj[u]) {
    if (!vis[v]) dfs(v);
  }
  path += char('`' + u);
}
void toposort() {
  vis.assign(N + 1, 0);
  for (long long i = 1; i < (long long)N + 1; i++) {
    if (!vis[i]) dfs(i);
  }
  reverse((path).begin(), (path).end());
}
void solve() {
  long long n;
  cin >> n;
  vs inp(n);
  rd(inp);
  fun(inp);
  if (flag || cyclic()) {
    cout << "Impossible";
    return;
  }
  toposort();
  cout << path;
}
int32_t main() {
  mangekyo();
  solve();
  cerr << "Time: " << fixed << setprecision(5)
       << ((clock() - _c) / CLOCKS_PER_SEC);
  ;
}
void mangekyo() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  srand(time(NULL));
  subl();
}