// No.587 七対子 // https://yukicoder.me/problems/no/587 // #include #include #include using namespace std; string solve(string &S); int main() { cin.tie(0); string S; cin >> S; string ans = solve(S); cout << ans << endl; } string solve(string &S) { unordered_map char_count; for (char s: S) char_count[s]++; string ans = ""; for (auto c: char_count) { if (c.second > 2) { ans = "Impossible"; break; } else if (c.second == 1) { if (ans != "") { ans = "Impossible"; break; } ans += c.first; } } return ans; }