#include #define rep(i,a,n) for (int i = a;i < n;i++) using namespace std; int main() { string s; cin >> s; map mp; rep(i, 0, s.size()) { mp[s[i]]++; } int one = 0, two = 0; string ans = "Impossible"; for (auto i : mp) { one += i.second == 1; two += i.second == 2; if (i.second == 1) ans = i.first; } cout << (one == 1 && two == 6 ? ans : "Impossible") << endl; }