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
thearyan_s: 2021-06-16 19:03:39

there's no space given between '*' and '.'

codehungry95: 2021-05-23 11:21:24

notice the pattern in the sum of i&j values.

sweetyagra_wal: 2021-03-17 13:21:40

i'm having difficulty with this in cpp if anyone have the solution or hint to it please mail me = chiniagarwal15@gmail.com

abhineelnandi: 2020-09-04 12:02:49

anyone want help notice odd and even lnes patterns are printed.

imperfect2407: 2019-08-15 15:50:59

My code works perfectly on ideone but it's showing wrong answer while submitting the same code downloaded from ideone.

saloniswagata: 2019-07-09 17:35:06

My code is working properly on ideone but it still shows runtime error. Help me!!

chalapathi_444: 2019-02-17 06:00:10

my code is working exactly but this not taking my code saying wrong answer can any one help me

czwblank: 2018-09-06 09:53:31

Just don't forget to process the input for no of test cases before processing the test case itself

ravalidarla: 2018-08-29 17:14:10

can any one give me suggestion,in which manner i have to submit the program


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