COCI 2006/2007, Contest #1

Task OKVIRI

"Peter Pan frames" are a way of decorating text in which every character is framed by a diamond-shaped frame, with frames of neigbhouring characters interleaving. A Peter Pan frame for one letter looks like this ('X' is the letter we are framing):

..#..
.#.#.
#.X.#
.#.#.
..#..

However, such a framing would be somewhat dull so we'll frame every third letter using a "Wendy frame". A Wendy frame looks like this:

..*..
.*.*.
*.X.*
.*.*.
..*..

When a Wendy frame interleaves with a Peter Pan frame, the Wendy frame (being much nicer) is put on top. For an example of the interleaving check the sample cases.

Input

The first and only line of input will contain at most 15 capital letters of the English alphabet.

Output

Output the word written using Peter Pan and Wendy frames on 5 lines.

Sample Tests

Input

A

Output

..#..
.#.#.
#.A.#
.#.#.
..#..

Input

DOG

Output

..#...#...*..
.#.#.#.#.*.*.
#.D.#.O.*.G.*
.#.#.#.#.*.*.
..#...#...*..

Input

ABCD

Output

..#...#...*...#..
.#.#.#.#.*.*.#.#.
#.A.#.B.*.C.*.D.#
.#.#.#.#.*.*.#.#.
..#...#...*...#..

All Submissions
Best Solutions


Point Value: 5
Time Limit: 1.00s
Memory Limit: 128M
Added: Jan 13, 2009

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

Why did i get none of the test cases right?

For the future, please stop just stating what did you do wrong, that's not what the comments are for. Please either ask for clarification or be specific on which parts you are getting stuck on.

this is the bullshit problem