from collections import Counter S=input() C=Counter(S) ANS=[] for s in "abcdefghijklm": C[s]+=1 two=0 flag1=1 for t in "abcdefghijklm": if C[t]==2: two+=1 if 1<=C[t]<=2: pass else: flag1=0 C[s]-=1 if two==1 and flag1==1: ANS.append(s) if len(ANS)==0: print("Impossible") else: for ans in ANS: print(ans)