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

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

*.*.*
.*.*.

hide comments
bhargav431997: 2015-10-25 03:35:38

15461368 :- what is fault in my code??? i can't understand.

mad_maxxxx: 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

gwjwnb: 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


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