for(;l=readline(u='');print(l.replace(/\D/g,' $& '),'=',u))for(;v=/.\w*/g(l);)u=eval(u+v)