#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]]++; } int one = 0, two = 0; char ans; for(auto i : mp) { if(i.second == 2) two++; if(i.second == 1) { one++; ans = i.first; } } if(one == 1 && two == 6) { cout << ans << endl; } else { cout << "Impossible" << endl; } return 0; }