while 1:x=bin(input())[2:];print"("*len(x)+")".join("()"*int(c)for c in x)+")"