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