Word Diamonds

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

A word diamond is formed from a word that begins and ends with the same letter. Consider this word diamond for the word 'ENCODE':

     E
    N N
   C   C
  O     O
 D       D
E         E
 D       D
  O     O
   C   C
    N N
     E

The leftmost letter of the diamond just touches the left margin. A shorter diamond, e.g., for the word 'DAD' looks like this:

  D
 A A
D   D
 A A
  D
      
Write a program that reads in a word and prints the word diamond associated with that word.

입력

A single line with a word that:

  • Has all capital letters
  • Has the same first and last letters
  • Is between 3 and 13 letters in length

출력

The word diamond itself. The word diamond for a word of length N has 2*N-1 lines. There are no spaces at the end of any line.