#include typedef long long ll; using namespace std; int INF = 1LL << 30; int MOD = 1e9+7; main(){ string S; cin >> S; map mp; for(char c:S)mp[c]++; int cnt = 0; char c; for(auto p:mp){ if(p.second == 1){ cnt++; c = p.first; }else if(p.second >= 3)cnt = INF; } if(cnt > 1)cout << "Impossible" << endl; else cout << c << endl; }