| TheForces Round #37 (Brute-Forces1) |
|---|
| Finished |
A grid containing $$$n$$$ rows and $$$n$$$ columns is called Beautiful grid if it satisfies the following conditions :
Your task is to construct any Beautiful grid for given $$$n$$$ and $$$k$$$.
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 100$$$). The description of the test cases follows.
The first line of each testcase contains two integers $$$n,k$$$ ($$$1 \le n \le 10^3$$$, $$$1 \le k \le 26$$$).
It is guaranteed that the sum of $$$n$$$ over all test cases doesn't exceed $$$10^3$$$.
For each test case, print $$$-1$$$ if there is no Beautiful grid. Otherwise print $$$n$$$ strings each of length $$$n$$$.
If there are multiple answers, output any.
51 12 12 23 23 26
z kk kk -1 www wyw www -1
| Name |
|---|


