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