CPTTRN1 - Character Patterns (Act 1)

Using two characters: . (dot) and * (asterisk) print a chessboard-like pattern. The first character printed should be * (asterisk).

Input

You are given t < 100 - 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 pattern (l, c < 100).

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

hide comments
2016-01-16 21:13:25
all the patterns given in the example are right
2015-12-16 10:30:08
jumabek ahaha


Last edit: 2015-12-16 10:31:59
2015-11-29 06:30:08
2nd output is not correct. It contradicts with 1st and 3rd output.
2015-11-01 18:27:21
Can i get some idea ? How can i start solving the this problem ?
2015-10-27 19:24:50
try using
if(!((i+j)&1)) instead of bool function. The bool function will never give the correct output in this case.
2015-10-25 03:35:38
15461368 :- what is fault in my code??? i can't understand.
2015-10-14 13:52:52
the conditions are not mentions properly...
there will not be any spaces between * and .
i thought there is space. lol
2015-09-11 07:02:56
2nd output 4 4 is not correct output as per other pattern is concerned.In 2nd line the output pattern should be first * not . after . of 1st line
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.