#include typedef long long ll; using namespace std; int INF = 1e9; int MOD = 1e9+7; int cnt[13]; main(){ string s; cin >> s; for(char c:s)if(c <= 'm')cnt[c-'a']++; int maxe = *max_element(cnt,cnt+13); if(maxe > 2){ cout << "Impossible" << endl; }else if(maxe == 2){ printf("%c\n",distance(cnt,min_element(cnt,cnt+13))+'a'); }else{ if(accumulate(cnt,cnt+13,0) != 13){ cout << "Impossible" << endl; }else{ for(int i = 0;i < 13;i++)printf("%c\n",i+'a'); } } }