Each line will contain one upper case word up to 12 characters long. The last line of the input contains a single #.
Output
Print the corresponding mountains, one after the other, for given words.
About statements
The official statement of a problem is always the one
in the PDF document. The HTML version of the statement
is also given to help you, but may contain some content
that is not well displayed. In case of doubt, always use the PDF.
Public test cases
Input
HAT
GREAT
FOUR
#
Output
T
AAT R
T EEEAT UUR
AAT RRRREAT OOOUR
HHHAT GGGGGREAT FFFFOUR
Input
HAT
GREAT
FOUR
#
Output
T
AAT R
T EEEAT UUR
AAT RRRREAT OOOUR
HHHAT GGGGGREAT FFFFOUR