f,i,k=7,q[];main(c){for(;i++<13;*q^=c,f+=q[c]>2)k-=!q[c=getchar()]++;puts(k|f?"Impossible":q);}