#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { string s; cin >> s; unordered_map hist; for (auto c : s) { ++hist[c]; } bool flag = false; for (auto i = 0; i < 13; ++i) { char c = char('a' + i); ++hist[c]; int32_t n0 = 0, n1 = 0, n2 = 0; for (auto p : hist) { if (p.second == 1) ++n1; else if (p.second == 2) ++n2; else if (p.second != 0) ++n0; } if (n0 == 0 && n1 != 0 && n2 == 1) { cout << c << endl; flag = true; } --hist[c]; } if (!flag) { cout << "Impossible" << endl; } return 0; }