#include using namespace std; int main(){ string S; cin >> S; vector freq(26, 0); for (char c : S){ ++freq[c - 'a']; } int c = 0; char t = '*'; for (int i = 0; i < 26; ++i){ if (freq[i] == 1) { ++c; t = 'a' + i; }else if (freq[i] >= 3){ cout << "Impossible" << endl; return 0; }; } if (c > 1){ cout << "Impossible" << endl; }else{ cout << t << endl; } return 0; }