S = input().rstrip() def is_valid(S): freq = [0] * 13 for a in S: if a > 'm' or a < 'a': print("Impossible") return freq[ord(a) - ord('a')] += 1 nzero = 0 ntwo = 0 t = [] for i, f in enumerate(freq): if f == 0: nzero += 1 t.append(chr(ord('a') + i)) if f == 2: ntwo += 1 if f >= 3: print("Impossible") return if (nzero == 1 and ntwo == 1): print(t[0]) elif (nzero == 0 and ntwo == 0): print('\n'.join('abcdefghijklm')) else: print("Impossible") is_valid(S)