CPTTRN8 - Character Patterns (Act 8)

Print a regular grid pattern with diamond-like base elements. Use the \ (backslash) and the / (slash) characters to print the borders and the * (asterisk) to print the inner part of the diamonds. Use . (dots) to fill the rest of the space.

Input

You are given t - the number of test cases and for each of the test cases three positive integers: r - the number of rows, c - the number of columns in the grid and s - the size of each diamond.

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 2 
4 4 1 
2 5 2

Output:
./\.
/**\
\**/
.\/.
./\.
/**\
\**/
.\/.
./\.
/**\
\**/
.\/.

/\/\/\/\
\/\/\/\/
/\/\/\/\
\/\/\/\/
/\/\/\/\
\/\/\/\/
/\/\/\/\
\/\/\/\/

./\../\../\../\../\.
/**\/**\/**\/**\/**\
\**/\**/\**/\**/\**/
.\/..\/..\/..\/..\/.
./\../\../\../\../\.
/**\/**\/**\/**\/**\
\**/\**/\**/\**/\**/
.\/..\/..\/..\/..\/.

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

hide comments
2020-02-05 09:19:51
It took me about a week to solve character pattern 7 and 8 but I did it. Yesssssssssssssss!!
Just break diamonds in 4 corners. top right, top left, bottom right, bottom left
2017-11-12 01:21:24
just use a boolean variable to know if the present position is in the diamond or not
2017-08-22 09:58:11
it took me 1 week to finish the problem... sh1t
the character pattern 7 just took me 70 lines, this one takes 128 lines

the concept is same but with different way of thinking from character pattern 7, just make the top and the bottom as a fixed line.

Last edit: 2017-08-22 10:01:54
2017-03-25 14:29:01
I simply copied the pattern 7 code and add a new variable to alternate between printing "*" and "." :D

Last edit: 2017-03-25 14:29:36
2016-12-03 08:19:31
this is quite easy if you have solved 'character pattern 7'
2015-10-19 20:26:08
In the case that You solved 'character pattern 7', then there is a 2-line change from that, you can make, using Regular Expressions, that will solve this. A good chance to bring out RegEx and let it work some magic.

Last edit: 2015-10-20 11:24:09
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.