#include using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) int main() { string s; cin >> s; vector cnt(26); REP(i, s.size()) cnt[s[i] - 'a']++; int one = 0, two = 0; char ans; REP(i, 26) { switch (cnt[i]) { case 1: one++; ans = (char) i+'a'; break; case 2: two++; break; } } if (one == 1 && two == 6) { cout << ans << endl; } else { cout << "Impossible" << endl; } return 0; }