#include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { string s; cin >> s; map data; for (int i = 0; i < s.length(); ++i) { ++data[s[i]]; } map::iterator itr; char one = -1; int two = 0; for (auto itr = data.begin(); itr != data.end(); ++itr) { if (itr->second==1) { one = itr->first; } else if (itr->second==2) { ++two; } } if (two == 6 && one != -1) { cout << one; } else { cout << "Impossible"; } }