A="abcdefghijklm" S=input() D={a:0 for a in A} for s in S: D[s]+=1 K=0 for a in A: K+=(D[a]==0) if K>=2: print("Impossible") elif K==1: print(min(D,key=lambda x:D[x])) else: for a in A: print(a)