#include using namespace std; bool check(string s) { map m; for (int i = 0; i < s.size(); i++) { m[s[i]] += 1; } for (char c = 'a'; c <= 'm'; c++) { if (m[c] == 0) return false; } return true; } int main() { string S; cin >> S; bool isImpossible = true; for (char c = 'a'; c <= 'm'; c++) { if (check(S + c)) { cout << c << endl; isImpossible = false; } } if (isImpossible) { cout << "Impossible" << endl; } }