n = int(input()) if n == 1: # According to constraints, n starts from 2, but handle if needed print("()") else: # Create one string as a single ')' print(")") # Create n-1 strings, each contributing +1 net, forcing a unique order for i in range(1, n): # Each of these strings is "((...))" with i opening and i-1 closing s = '(' * (i + 1) + ')' * i # Trim if necessary, but for the given constraints, it should fit within n^2 print(s[:2*i + 1])