Public submissions
Source code of every submission to this problem in this contest will be visible for everyone since 2014-01-13 00:40:29.

PCROSS2 - Cross Pattern (Act 2)

Print a cross pattern using the * (asterisk) and . (dot) characters.

Input

The first line contains an integer t, the number of test cases. The next t lines contain four integers separated by spaces: m, n, ci, cj.

Output

For each test case print a cross on an m-by-n grid centered at row ci and column cj, as shown in the example.

Constraints

1 ≤ t ≤ 100
1 ≤ m,n ≤ 100
1 ≤ cim
1 ≤ cjn

Example

Input:

3
1 1 1 1
5 5 3 3
8 13 3 5

Output:

*

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

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

Added by:Mitch Schwartz
Date:2014-01-11
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Public source code since: 2014-01-13 00:40:29

hide comments
2015-01-29 12:07:26 Faizan Shaikh
really a good problem! hats off sir
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.