n = int(input()) ans = ["("] for i in range(1, n-1): s = ")"*i + "("*(i+1) ans.append(s) ans.append(")"*(n-1)) print(*ans, sep = "\n")