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
karthick89: 2021-12-29 07:33:33

Interesting!

Last edit: 2021-12-29 07:34:23
straja: 2021-10-29 17:56:16

I'm a fag

Last edit: 2021-10-29 23:03:26
langcao: 2021-09-17 21:27:35

also how do you solve this problem in c++ you need to enter 1 not blank!

preetjain555: 2021-08-12 15:51:17

is it just me who is unable to do even these basic problems

pankajsain: 2021-07-10 12:18:57

i dont know how to start

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.


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