#include using namespace std; string S; int cnt[30]; int main() { cin >> S; bool f = false; for (char c = 'a'; c <= 'm'; c++) { string s = S + c; sort(s.begin(), s.end()); memset(cnt, 0, sizeof(cnt)); for (char cc : s) cnt[cc - 'a']++; bool ok = false; for (char cc = 'a'; cc <= 'm'; cc++) { if (cnt[cc - 'a'] == 0) { ok = false; break; } else if (cnt[cc - 'a'] == 2) { if (ok) { ok = false; break; } else { ok = true; } } } if (ok) { cout << c << endl; f = true; } } if (!f) cout << "Impossible" << endl; }