#include #define FOR(i,bg,ed) for(ll i=(bg);i<(ed);i++) #define REP(i,n) FOR(i,0,n) #define MOD 1000000007 //#define int long long using namespace std; typedef long long ll; typedef vector> mat; const int INF = 1e9; bool check(string str) { bool two = false; for (char c='a'; c<='m'; c++) { int cnt = 0; REP(i,str.length()) if (c == str[i]) cnt++; if (cnt == 0) return false; else if (cnt == 1) continue; else if (cnt == 2) { if (two) return false; two = true; } else { return false; } } if (!two) return false; return true; } signed main() { string S; cin >> S; bool find = false; for (char c='a'; c<='z'; c++) { //cout << "### " << c << " ###" << endl; if (check(S + c)) { cout << c << endl; find = true; } } if (!find) { cout << "Impossible" << endl; } }