CPTTRN4 - Character Patterns (Act 4)


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 four positive integers: l - the number of lines, c - the number of columns in the grid; h and w - the high and the width of the single rectangle.

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 2 1
4 4 1 2
2 5 2 2

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

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

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

hide comments
deveshd020: 2015-10-22 13:46:57

yes its width not with

Anubhav Saini: 2015-10-14 09:52:31

" the high and the with of the single rectangle." => should be => " the height and the width of the single rectangle."


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