from collections import Counter alp = "abcdefghijklm" S = input() chkflg = 0 for x in Counter(list(S)).values(): if x > 2 or chkflg > 1: print("Impossible") exit() elif x == 2: chkflg += 1 if set(list(alp)) == set(list(S)): for x in list(alp): print(x) else: res = set(list(alp)) - set(list(S)) for x in sorted(res): print(x)