#include using namespace std; int main() { string temp = "abcdefghijklm"; string S; cin >> S; int sum[26] = {}; for(auto &c : S) sum[c - 'a']++; bool flag = false; for(int i = 0; i < temp.size(); i++) { sum[i]++; int one = 0, two = 0, other = 0; for(int j = 0; j < temp.size(); j++) { if(sum[j] == 1) ++one; else if(sum[j] == 2) ++two; else ++other; } if(other == 0 && two == 1) { cout << temp[i] << endl; flag = true; } sum[i]--; } if(!flag) cout << "Impossible" << endl; }