s=input() chk={i:0 for i in 'abcdefghijklm'} for i in s: if i not in chk: continue else: chk[i]+=1 if [*chk.values()].count(0)>1 or [*chk.values()].count(2)>1: print('Impossible') elif [*chk.values()].count(1)==len('abcdefghijklm'): print(*[*'abcdefghijklm'],sep='\n') else: for i,j in chk.items(): if j==0: print(i) break