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