import std.stdio;void main(){for(int o,s,p,n;~scanf("%d%c",&n,&o);p=o)printf(o-10?&*"%d %c ":&*"%d = %3$d ",n,o,s=p%5?p%3?s+n:s*n:p%2?s-n:n);}