#include using namespace std; int main() { string S; cin >> S; map mp; for( int i = 0; i < S.size(); i++ ) { mp[ S[i] ]++; } int cnt = 0; for( auto e : mp ) { if( e.second == 2 ) cnt++; } if( cnt != 6 ) cout << "Impossible" << endl; else { for( auto e : mp ) { if( e.second == 2 ) continue; cout << e.first << endl; break; } } }