URI Online Judge | 2484

Abracadabra

By João Marcos Salvanini Bellini de Moraes, IFSULDEMINAS BR Brazil

Timelimit: 1

In the 22st century, a devastating disease reached more than half the world population. The government is desperate for a cure because there's a high risk that the disease will decimate the entire population. The hospitals are crowded and the grief in people's eyes is remarkable.

At this time, few people have free access to the internet, but you are one of them. As you scour the web, you've found some scattered texts about an amulet of a magic word written in the shape of a triangle that heals lethal diseases. Skeptic but hopeful, you remembered that Mr. Severino's library had a somewhat unusual book with the following cover:

Then you went to the library immediately. Once there, you read only the book preface and confirmed everything you've read about the amulets in the web, then you gave yourself a mission: spread magic words in the web in the shape of a triangle in order to warn people that there may be a cure for the disease. Hence, if amulets with magic words end up being made in large scale and these are given to people, the disease may be annihilated and the population saved.

In order to complete this mission, you must start with the simplest move: write a program that takes a word as input and outputs it as a triangle, just like the book's cover.

Input

The input has several test cases. Each test case consists of a word from 2 up to 100 characters (no blank spaces). Read input until EOF.

Output

For each test case, print the word in the shape of a triange. There's a blank space between each letter, but no blank space after the last letter of each line. Print a newline after every test case, including the last one.

Input Sample Output Sample

ABRACADABRA

HELPME

DIS

A B R A C A D A B R A

 A B R A C A D A B R

  A B R A C A D A B

   A B R A C A D A

    A B R A C A D

     A B R A C A

      A B R A C

       A B R A

        A B R

         A B

          A


H E L P M E

 H E L P M

  H E L P

   H E L

    H E

     H


D I S

 D I

  D