#include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define ld long double #define all(v) begin(v), end(v) #define rep(i, n) for (ll i = 0; i < n; ++i) #define rep2(i, n, m) for (ll i = n; i <= m; ++i) #define rep3(i, n, m) for (ll i = n; i >= m; --i) template bool chmax(S& a, T& b) { if (a < b) { a = b; return true; } return false; } template bool chmin(S& a, T& b) { if (a > b) { a = b; return true; } return false; } int main() { string s; cin >> s; map cnt; for (char& c : s) ++cnt[c]; string ans; for (auto [c, p] : cnt) { if (p > 2) { cout << "Impossible" << endl; return (0); } if (p == 1) ans += c; } if (ans.size() == 1) cout << ans << endl; else cout << "Impossible" << endl; return (0); }