#include "bits/stdc++.h" using namespace std; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i)) #define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i)) static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL; typedef vector vi; typedef pair pii; typedef vector > vpii; typedef long long ll; template static void amin(T &x, U y) { if (y < x) x = y; } template static void amax(T &x, U y) { if (x < y) x = y; } int main() { string S; while (cin >> S) { bool imp = true; for (char a : "abcdefghijklm") if (a) { string t = S + a; map cnt; for (char c : t) ++ cnt[c]; map aa; for (char a : "abcdefghijklm") if (a) ++ aa[cnt[a]]; if (aa[1] == 12 && aa[2] == 1) { imp = false; cout << a << endl; } } if (imp) puts("Impossible"); } return 0; }