Public submissions
Source code of every submission to this problem in this contest will be visible for everyone since 2013-08-24 14:43:43.

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
Public source code since: 2013-08-24 14:43:43

hide comments
2018-05-06 12:32:03
how to check rankings
2015-06-24 11:29:11
easy :D AC in one go..
2014-01-19 10:19:20 Kaustubh Mallik
can we discuss these questions on forum as these are from contest. plz reply..
2014-01-19 10:15:10 Kaustubh Mallik
Is newline needed after last output pattern?

[edit by kuszi: No]

Last edit: 2014-01-19 15:50:47
2014-01-14 11:21:39 kuszi
@Snehasish Karmakar: all below 100 (the statemen has been updated)
PS: the solution should not rely on this information.

Last edit: 2014-01-14 11:23:46
2014-01-14 08:08:39 Snehasish Karmakar
@Ɓukasz Kuszner : What are the limits of t,l and c ?
2013-12-19 09:39:23 kuszi
@Mitch Schwartz - thank you. Missing newline appended.
2013-12-19 07:00:13 Mitch Schwartz
The last line of input isn't terminated with a newline in at least one input file.

Edit: Thanks!

Last edit: 2013-12-19 17:18:16
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.