#include #define rep(i, n) for (int i = 0; i < n; ++i) typedef long long ll; using namespace std; int main() { string s; cin >> s; sort(s.begin(), s.end()); s.erase(unique(s.begin(), s.end()), s.end()); string t = "abcdefghijklm"; cout << s << endl; if (s.size() == 12) { rep(i, t.size()) { if (s[i] != t[i]) { cout << t[i] << endl; break; } } } else if (s.size() == 13) { rep(i, t.size()) { cout << t[i] << endl; } } else { cout << "Impossible\n"; } return 0; }