#include #include #include using namespace std; int main(){ int table[26]={},count=-1; char out; string str; cin >> str; for(int i=0;str[i]!='\0';i++){ table[str[i]-'a']++; } for(int i=0;i<26;i++){ if(!(table[i]==2||table[i]==0)){ if(table[i]>2) count++; out = 'a' + i; count++; } } if(count) cout << "Impossible" << endl; else cout << out << endl; }