char*p;main(s,t){for(gets(p=t);*p>47;p[1]/--*p?*++p+=9:0)puts(p);}