CPTTRN3 - Character Patterns (Act 3)


Using two characters: . (dot) and * (asterisk) print a grid-like pattern.

Input

You are given t - the number of test cases and for each of the test cases two positive integers: l - the number of lines and c - the number of columns in the grid. Each square of the grid is of the same size and filled with 4 dots (see the example below).

Output

For each of the test cases output the requested pattern (please have a look at the example). Use one line break in between successive patterns.

Example

Input:
3
3 1
4 4
2 5

Output:
****
*..*
*..*
****
*..*
*..*
****
*..*
*..*
****

*************
*..*..*..*..*
*..*..*..*..*
*************
*..*..*..*..*
*..*..*..*..*
*************
*..*..*..*..*
*..*..*..*..*
*************
*..*..*..*..*
*..*..*..*..*
*************

****************
*..*..*..*..*..*
*..*..*..*..*..*
****************
*..*..*..*..*..*
*..*..*..*..*..*
****************

hide comments
shubhanshu001: 2016-06-19 06:01:03

AC!! in first go :)

Vipin: 2016-06-04 17:33:10

Like butter... :D

vks2610: 2016-05-24 09:26:41

quite easy

Ishwar: 2016-04-24 07:24:35

Damn easy if you think about each line and each character "counts"

Last edit: 2016-04-24 07:25:11
try2catch: 2016-03-19 18:24:26

think smart... its easy

oasisravikumar: 2016-03-13 13:49:37

don't hurry, check every small pattern
otherwise easy

mahalakshmi27: 2016-02-14 10:21:08

not so easy..........

salvatore13: 2016-02-09 18:31:24

after first 2 patterns problems I have to just change one IF statement. Eaaaasy

Last edit: 2016-02-09 18:32:05
gsstrholmes: 2016-01-24 18:33:42

hard!!

gsstrholmes: 2016-01-08 12:09:39

oh noooooooooooooooooooo!


Added by:kuszi
Date:2012-09-03
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64