| The 2026 ICPC Belarus Qualification |
|---|
| Finished |
Svetozar's favorite number is the number $$$n$$$. His favorite color is red. His favorite geometric shape is a square. And his least favorite activity is logo design.
That is why he assigned this to you. The requirements for the logo are simple:
Generate any logo that satisfies the conditions above.
The first line contains an integer $$$t$$$ ($$$1 \leq t \leq 10^4$$$): the number of test cases. Then, $$$t$$$ test cases follow.
The only line of a test case contains an integer $$$n$$$ ($$$1 \leq n \leq 10^6$$$): the number of red squares in the logo.
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^6$$$.
For each test case, print the logo in the following format.
In the first line, print an integer $$$m$$$ ($$$1 \leq m \leq 10^6$$$).
In the next $$$m$$$ lines, print the logo: each line must contain exactly $$$m$$$ characters '#' (a red square) or '.' (an uncolored square).
If there are several valid logos, print any.
31210
1#2##..4#######.###.....
| Name |
|---|


