CF1950B.Upscaling

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Upscaling

You are given an integer nn. Output a 2n×2n2n \times 2n checkerboard made of 2×22 \times 2 squares alternating '#' and '.', with the top-left cell being '#'.

The picture above shows the answers for n=1,2,3,4n=1,2,3,4.

Input

The first line contains an integer tt (1t201 \leq t \leq 20) — the number of test cases.

The only line of each test case contains a single integer nn (1n201 \leq n \leq 20) — it means you need to output a checkerboard of side length 2n2n.

Output

For each test case, output 2n2n lines, each containing 2n2n characters without spaces — the checkerboard, as described in the statement. Do not output empty lines between test cases.

Samples

4
1
2
3
4
##
##
##..
##..
..##
..##
##..##
##..##
..##..
..##..
##..##
##..##
##..##..
##..##..
..##..##
..##..##
##..##..
##..##..
..##..##
..##..##

在线编程 IDE

建议全屏模式获得最佳体验