#include using namespace std; using ll = long long; string alpha = "abcdefghijklm"; vector vec; int main() { cin.tie(0); ios::sync_with_stdio(false); string S; cin >> S; for (char c = 'a'; c <= 'm'; c++) { string t = alpha + c; sort(t.begin(), t.end()); vec.push_back(t); } bool f = false; for (char c = 'a'; c <= 'm'; c++) { string t = S + c; sort(t.begin(), t.end()); for (auto v : vec) { if (v == t) { cout << c << endl; f = true; } } } if (!f) { cout << "Impossible" << endl; } return 0; }