#include #include using namespace std; using namespace atcoder; using ll = long long; using ld = long double; string S; map mp; int main() { cin >> S; int N = S.size(); for (int i = 0; i < N; i++) mp[S[i]]++; char ans; bool flag = false; int cnt = 0; for (auto p: mp) { if (p.second > 2) { cout << "Impossible" << endl; return 0; } else if (p.second == 2) cnt++; else if (p.second == 1) { cnt++; ans = p.first; } } if (cnt == 7) cout << ans << endl; else cout << "Impossible" << endl; return 0; }