311209: CF1950B. Upscaling

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:4 Solved:0

Description

B. Upscalingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

You are given an integer $n$. Output a $2n \times 2n$ checkerboard made of $2 \times 2$ squares alternating '$\texttt{#}$' and '$\texttt{.}$', with the top-left cell being '$\texttt{#}$'.

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

Input

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

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

Output

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

ExampleInput
4
1
2
3
4
Output
##
##
##..
##..
..##
..##
##..##
##..##
..##..
..##..
##..##
##..##
##..##..
##..##..
..##..##
..##..##
##..##..
##..##..
..##..##
..##..##

Output

题目大意:
您将获得一个整数 $ n $。输出一个由 $ 2 \times 2 $ 方格交替组成的 $ 2n \times 2n $ 棋盘格,方格交替为 ' #' 和 ' .',左上角的单元格为 ' #'。

输入数据格式:
第一行包含一个整数 $ t $ ($ 1 \leq t \leq 20 $) —— 测试用例的数量。
每个测试用例只有一行,包含一个整数 $ n $ ($ 1 \leq n \leq 20 $) —— 这意味着您需要输出边长为 $ 2n $ 的棋盘格。

输出数据格式:
对于每个测试用例,输出 $ 2n $ 行,每行包含 $ 2n $ 个字符,无空格 —— 如题目描述的棋盘格。测试用例之间不要输出空行。

示例:
输入:
```
4
1
2
3
4
```
输出:
```
##
##
##..
##..
..##
..##
##..##
##..##
..##..
..##..
##..##
##..##
##..##..
##..##..
..##..##
..##..##
##..##..
##..##..
..##..##
..##..##
```题目大意: 您将获得一个整数 $ n $。输出一个由 $ 2 \times 2 $ 方格交替组成的 $ 2n \times 2n $ 棋盘格,方格交替为 ' #' 和 ' .',左上角的单元格为 ' #'。 输入数据格式: 第一行包含一个整数 $ t $ ($ 1 \leq t \leq 20 $) —— 测试用例的数量。 每个测试用例只有一行,包含一个整数 $ n $ ($ 1 \leq n \leq 20 $) —— 这意味着您需要输出边长为 $ 2n $ 的棋盘格。 输出数据格式: 对于每个测试用例,输出 $ 2n $ 行,每行包含 $ 2n $ 个字符,无空格 —— 如题目描述的棋盘格。测试用例之间不要输出空行。 示例: 输入: ``` 4 1 2 3 4 ``` 输出: ``` ## ## ##.. ##.. ..## ..## ##..## ##..## ..##.. ..##.. ##..## ##..## ##..##.. ##..##.. ..##..## ..##..## ##..##.. ##..##.. ..##..## ..##..## ```

加入题单

算法标签: