A = {i:0 for i in "abcdefghijklm"} for i in input(): if i in A: A[i]+=1 if list(A.values()).count(0)>1: print("Impossible") elif max(A.values()) > 1: for i,j in A.items(): if j == 0: print(i) else: for i in sorted(A): print(i)