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