#include #define REP(i, a, n) for(ll i = ((ll) a); i < ((ll) n); i++) using namespace std; typedef long long ll; int main(void) { string S; cin >> S; sort(S.begin(), S.end()); S.push_back('o'); bool pair = false; bool ans = true; char temp = 'a'; char lost = '\0'; int memo = 0; REP (i, 0, 13) { if (S[i] != (char)(temp + memo + i)) { if (lost != '\0') { ans = false; break; } lost = (char)(temp + memo + i); memo++; } if (S[i] == S[i+1]) { if (pair) { ans = false; break; } pair = true; memo--; } } if (!ans) cout << "Impossible" << endl; else if (pair) cout << lost << endl; else REP(i, 0, 13) cout << S[i] << endl; return 0; }