const
	maxn = 50;
var
	n: longint;
	c: array [1..maxn] of char;


procedure generate(i, j: longint);
var
	p: longint;
begin
	if i > 2 * n then begin
		for p := 1 to 2 * n do begin
			write(c[p]);
		end;
		writeln;
		exit;
	end;

	if 2 * n - i >= j + 1 then begin
		c[i] := '(';
		generate(i + 1, j + 1);
	end;
	if (j > 0) then begin
		c[i] := ')';
		generate(i + 1, j - 1);
	end
end;

begin
	readln(n);
	generate(1, 0);
end.