n=input() c=1 while c: print"M("*c+`n`+")"*c if n>100:n-=10;c-=1 else:n+=11;c+=1 print 91