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