#include using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); vector a(13); REP(i, 13) { char c; cin >> c; a[c - 'a']++; } int cnt0 = 0, cnt1 = 0, cnt2 = 0, empty; REP(i, 13) { switch (a[i]) { case 0: cnt0++; empty = i; break; case 1: cnt1++; break; case 2: cnt2++; break; default: break; } } if (cnt1 == 13) { REP(i, 13) cout << (char) ('a' + i) << endl; } else if (cnt0 == 1 && cnt1 == 11 && cnt2 == 1) { cout << (char) ('a' + empty) << endl; } else { cout << "Impossible" << endl; } return 0; }