#include using namespace std; #define rep(i,n) for (int (i)=(0);(i)<(int)(n);++(i)) using ll = long long; using P = pair< int, int >; string t = "abcdfgjhijklm"; int a[14]; int main() { string s; cin >> s; rep(i, s.size()) { if ('a' <= s[i] and s[i] <= 'm') { a[s[i]-'a']++; } else { cout << "Impossible" << endl; return 0; } } bool two=false; bool zero=false; bool ok=true; rep(i, 13) { if (a[i] == 2) { if (!two) { two = true; } else { ok = false; break; } } else if (a[i] == 0) { if (!zero) { zero = true; } else { ok = false; break; } } else if (a[i] > 2) { ok = false; break; } } if (!ok) { cout << "Impossible" << endl; } else { if (zero) { rep(i, 13) { if (a[i] == 0) { cout << char('a' + i) << endl; return 0; } } } else { rep(i, 13) { cout << char('a'+i) << endl; } } } }