#include #include #include void solve() { std::vector cnt(26, 0); { std::string s; std::cin >> s; for (char c : s) ++cnt[c - 'a']; } for (int i = 0; i < 26; ++i) { ++cnt[i]; bool ok = true; for (auto c : cnt) { if (c != 0 && c != 2) ok = false; } if (ok) { std::cout << char('a' + i) << std::endl; return; } --cnt[i]; } std::cout << "Impossible" << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }