#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); const string s0{ "abcdefghijklm" }; string s; cin >> s; sort(s.begin(), s.end()); if (s == s0) { for (const auto& ss : s) cout << ss << "\n"; return 0; } string dif1, dif2; set_difference(s.begin(), s.end(), s0.begin(), s0.end(), inserter(dif1, dif1.end())); set_difference(s0.begin(), s0.end(), s.begin(), s.end(), inserter(dif2, dif2.end())); string res; if (dif1.size() == 1 && dif2.size() == 1) res = dif2; else res = "Impossible"; cout << res << "\n"; return 0; }