#include using namespace std; int main() { vector V(26); char C; while (cin >> C) V.at(C - 'a')++; int x = 0, y = 0, z; for (int i = 0; i < 26; i++) { if (V.at(i) == 1) x++, z = i; if (V.at(i) > 2) y++; } if (x == 1 && !y) cout << char('a' + z) << "\n"; else cout << "Impossible" << "\n"; }