Problems
Pyramid of the symbols
Pyramid of the symbols
Vasya wants to print on your printer pyramid of some sort of symbol height h. Write a program that will help him in this, not forgetting that the program must be "economically viable", i.e. to print the least amount of characters.
Examples of pyramids are shown in the examples of input and output data. For clarity, printed blanks are replaced by point.
Input data
In a single line given first symbol, by which must be printed pyramid, and then through a gap and a positive integer specifying the height of the pyramid h (h ≤ 50).
Output data
In the first line print the total number of "printing" characters and below the pyramid itself.
Examples
Input example #1
A 3
Output example #1
12 A AAA AAAAA
Input example #2
M 9
Output example #2
117 M MMM MMMMM MMMMMMM MMMMMMMMM MMMMMMMMMMM MMMMMMMMMMMMM MMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMM