#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string s; cin >> s; map mp; for(int i = 0; i < s.size(); i++) { mp[s[i]]++; } bool one = false; char ans = '?'; for(auto i : mp) { if(one && i.second == 1) { cout << "Impossible" << endl; return 0; } if(!one && i.second == 1) { one = true; ans = i.first; } } if(ans == '?') cout << "Impossible" << endl; else cout << ans << endl; return 0; }