a[999],t,x;main(i){for(;i<128;t+=a[i]==2,a[++i]==1?x=i:0)a[getchar()]++;printf(t-6?"Impossible":"%c",x);}