#include using namespace std; using ll = long long; using ul = unsigned long; using ull = unsigned long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); string s; cin >> s; map m; for (const auto& it : s) ++m[it]; bool ok = true; int odd{ 0 }; char c; for (const auto& it : m) { if (it.second > 2) { ok = false; break; } else if (it.second == 1) { c = it.first; ++odd; } } if (!ok || odd > 1) cout << "Impossible\n"; else cout << c << "\n"; return 0; }