#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { int i, j, k; string s; vectorlist(13, 0); cin >> s; for (i = 0; i < s.length(); i++) { if (s[i] - 97 >= 13) { cout << "Impossible" << endl; return 0; } list[(int)s[i] - 97]++; } int one = 0, two = 0, th = 0; for (i = 0; i < 13; i++) { if (list[i] == 1) { one++; } else if (list[i] == 2) { two++; } else if (list[i] >= 3) { th++; } } if (th >= 1 || two >= 2) { cout << "Impossible" << endl; //return 0; } else if (one == 13) { for (i = 0; i < 13; i++) { cout << (char)('a' + i ) << endl; } } else if (one == 11 && two == 1) { for (i = 0; i < 13; i++) { if (list[i] == 0) { char ch = 'a'; cout << (char)(ch + i) << endl; break; } } } getchar(); getchar(); return 0; }