S,A,t=input(),'abcdefghijklm',set Z=t([x for x in A if t(x+S)==t(A)]) print(('Impossible','\n'.join(sorted(Z)))[Z!=t()])