{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003e\n A $\\textit{parentheses matrix}$ is a matrix where every element is either \u0027(\u0027 or \u0027)\u0027. We define the $\\textit{goodness}$ of a parentheses matrix as the number of $\\textit{balanced}$ rows (from left to right) and columns (from up to down). Note that:\u003cbr\u003e\u003cbr\u003e\n - an empty sequence is balanced;\u003cbr\u003e\n - if $A$ is balanced, then $(A)$ is also balanced;\u003cbr\u003e\n - if $A$ and $B$ are balanced, then $AB$ is also balanced.\u003cbr\u003e\u003cbr\u003e\n For example, the following parentheses matrix is a $2 \\times 4$ matrix with goodness 3, because the second row, the second column and the fourth column are balanced:\u003cbr\u003e\u003cbr\u003e\n )()(\u003cbr\u003e\n ()()\u003cbr\u003e\u003cbr\u003e\n Now, give you the width and the height of the matrix, please construct a parentheses matrix with maximum goodness.\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line of input is a single integer $T$ $(1 \\leq T \\leq 50)$, the number of test cases.\u003cbr\u003e\u003cbr\u003e\nEach test case is a single line of two integers $h, w$ $(1 \\leq h, w \\leq 200)$, the height and the width of the matrix, respectively."}},{"title":"Output","value":{"format":"HTML","content":"For each test case, display $h$ lines, denoting the parentheses matrix you construct. Each line should contain exactly $w$ characters, and each character should be either \u0027(\u0027 or \u0027)\u0027. If multiple solutions exist, you may print any of them."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e3\r\n1 1\r\n2 2\r\n2 3\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e(\r\n()\r\n)(\r\n(((\r\n)))\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}