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