Problem list
Log in
#coci00003 · COCI 2006/2007 Contest 1

Okviri

Silver V 1.0 s 32 MB

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

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

However, such a framing would be somewhat dull, so we frame every third letter using a "Wendy frame" instead. 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. See the sample cases for an example of the interleaving.

Input

The first and only line of input contains at most $5$ capital letters of the English alphabet.

Output

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

Example 1

Input
A
Output
..#..
.#.#.
#.A.#
.#.#.
..#..

Example 2

Input
DOG
Output
..#...#...*..
.#.#.#.#.*.*.
#.D.#.O.*.G.*
.#.#.#.#.*.*.
..#...#...*..

Example 3

Input
ABCD
Output
..#...#...*...#..
.#.#.#.#.*.*.#.#.
#.A.#.B.*.C.*.D.#
.#.#.#.#.*.*.#.#.
..#...#...*...#..
Source
COCI 2006/2007 Contest 1
Appears in
Not part of a ladder, contest or set yet.
Accepted 1 Submissions 1 Acceptance 100% Solvers 1

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code