t,a,b;main(i){for(;read(0,&t,1);t>32?b=b?9:t-49:i--?a=b,b=0:putchar(a*b-1?a*b<1?83:80:69));}