#include #include #include #include using namespace std; int main() { string s; cin >> s; vector cnt(256); for (char c : s) { cnt[c]++; } char ans; int uniq = 0; for (int i = 0; i < 256; i++) { if (cnt[i] == 1) { ans = i; } else if (cnt[i] > 2) { cout << "Impossible" << endl; return 0; } if (cnt[i] <= 2) { uniq++; } } if (uniq != 7) { cout << "Impossible" << endl; return 0; } cout << ans << endl; }