A Cipher in Wonderland

Interview

Time limit1sMemory limit512 MB

Summary
For the i-th line, read the sentence starting at the first character and print every i-th character in order.
Level

Easy3 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

Hayoung, who loves novels, was reading Alice's Adventures in Wonderland as usual.

While reading, her mind went blank, and she suddenly realized she had fallen into Wonderland!

Wandering through Wonderland, Hayoung met the card soldiers of Wonderland.

The card soldiers, servants of the Queen of Hearts, told Hayoung that if she correctly deciphered the cipher sentences they spoke, they would spare her, but if she got even one wrong, they would execute her on the Queen of Hearts' orders!

While wondering how to decipher this long text made of many lines, Hayoung found a stone tablet lying in the grass.

[ The sentence on line i must be read starting from its first character, skipping i characters at a time ]

However, Hayoung realized she did not have enough time to decipher this cipher herself. To save Hayoung, write a program that deciphers what this cipher means!

Input

From the first line, up to 100 lines contain sentences to decipher, made of uppercase English letters. The length of a sentence is a positive integer no greater than 10410^4.

After all the sentences to decipher are given, the last line is given as Was it a cat I saw?, and the last line is not deciphered.

Output

Print the cipher deciphered from each line's sentence, one sentence per line.

Hint

"Was it a cat I saw?" is a palindrome that appears in the actual novel Alice's Adventures in Wonderland.

Examples2

  1. Example 1

    Input
    HZAOPAPCYSUENCBOINRDTCHODNATY
    Was it a cat I saw?
    
    Expected output
    HAPPYUNBIRTHDAY
    
  2. Example 2

    Input
    RAEBDCVDEELFVGEHT
    SIJEKLUMNLOPGQRI
    ISTURVWXEYZANBCDE
    WEFGHEIJKLNMNOPDQRSTY
    YUVWXYEZABCDREFGHII
    JJKLMNOOPQRSTUY
    Was it a cat I saw?
    
    Expected output
    REDVELVET
    SEULGI
    IRENE
    WENDY
    YERI
    JOY