## MWC '15 #2 P1: Symmetry

View as PDF

Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem types

MathBunny123 loves to play around with letters. He even has his own signature pattern. It is as follows: given a sequence of letters,

• On the first line, print each letter from left to right times, being the position of the letter (the first letter is at position ), then going from the second last letter to the first letter, print each letter times.
• On the next lines, replace the letter from the left and right of the previous line in the pattern with the first letter.
• The rest of the pattern should contain lines which make the entire pattern symmetrical vertically.

#### Input Specification

The input will contain one line with a sequence of letters, not separated by spaces. There will be letters, and will be odd.

#### Output Specification

Output MathBunny123's signature pattern using the given letters.

#### Sample Input

ABC

#### Sample Output

ABBCCCBBA
AABCCCBAA
AAACCCAAA
AAAACAAAA
AAAAAAAAA
AAAACAAAA
AAACCCAAA
AABCCCBAA
ABBCCCBBA