S,A,t,p=input(),'abcdefghijklm',set,print Z=t([p(x) for x in A if t(x+S)==t(A)]) if Z=={None}:p('Impossible')