M. Learning to Write CAMA
time limit per test
1 second
memory limit per test
512 megabytes
input
standard input
output
standard output

Litusiano was resting on his bed when he thought of the following problem:

You are given two integers, $$$n$$$ and $$$m$$$. Your task is to draw a letter "C" made of the character '#' with height $$$n$$$ and length $$$m$$$. After that, you need to print the word "AMA" at the bottom of the "C".

The "C" should have the following properties:

1. The "C" should have a height of $$$n$$$ rows. 2. The "C" should have a width of $$$m$$$ columns. 3. The top and bottom parts of the "C" should be fully filled with '#'. 4. The left part of the "C" should be a column of '#' characters, except for the top and bottom rows. 5. After printing the "C", print the word "AMA" in the next row.

Input

The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 69$$$) — the number of test cases.

For each test case:

- The first line contains two integers $$$n$$$ and $$$m$$$ ($$$1 \leq n, m \leq 69$$$) — the height and length of the C of CAMA.

Output

For each test case, print the "C" followed by the word "AMA" on the next line.

- The "C" should have a height of $$$n$$$ rows and a width of $$$m$$$ columns. - The top and bottom parts of the "C" should be fully filled with '#'. - The left part of the "C" should be a column of '#' characters, except for the top and bottom rows. - After printing the "C", print the word "AMA" on the next line.

Example
Input
5
4 1
2 3
6 9
2 6
1 9
Output
#
#
#
#AMA
###
###AMA
#########
#
#
#
#
#########AMA
######
######AMA
#########AMA