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