#include using namespace std; typedef long long ll; int main() { int cnt[256] {}; string s; cin >> s; for (char c : s) cnt[c]++; int two = 0; char one; for (char c = 'a'; c <= 'z'; c++) { if (cnt[c] == 2) two++; else if (cnt[c] == 1) one = c; } if (two == 6) cout << one << endl; else puts("Impossible"); return 0; }