n = int(input()) count = 1 print("(") for i in range(2,n): print(")"*count + "("*(count+1)) count += 1 print(")"*count)