Public submissions
Source code of every submission to this problem in this contest will be visible for everyone since 2013-08-24 14:45:36.

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:
****
*..*
*..*
****
*..*
*..*
****
*..*
*..*
****

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

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

Added by:kuszi
Date:2012-09-03
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Public source code since: 2013-08-24 14:45:36

hide comments
2015-06-25 15:46:34 Pawe³ Krause
I sort of don't understand those kind of problems

Last edit: 2015-06-25 15:47:00
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.