n=input() d=1 while 1:print'M('*d+`n`+')'*d;k=n/101-d/d;n-=k^10;d-=k|1