#include using namespace std; using ll = long long; using Graph = vector>; int main() { string S; cin >> S; map dic; for(int i =0; i < S.size(); i++) { dic[S[i]]++; } int count = 0; char ans = 'e'; for (const auto& [key, value] : dic) { if(value == 2) { count++; }else { ans = key; } } if(count == 6) { cout << ans << endl; }else { cout << "Impossible" << endl; } }