#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { string s; cin >> s; vector hist(26); for (auto c : s) { ++hist[c - 'a']; } vector ns(2); for (auto i = 0; i < 26; ++i) { if (hist[i] == 1 || hist[i] == 2) ++ns[hist[i] - 1]; } int32_t ans = -1; if (ns[0] == 1 && ns[1] == 6) { for (auto i = 0; i < 26; ++i) { if (hist[i] == 1) ans = i; } } if (ans != -1) { cout << char('a' + ans) << endl; } else { cout << "Impossible" << endl; } return 0; }