#P1928. Alien Password Decompression

    ID: 15210 Type: Default 1000ms 256MiB

Alien Password Decompression

Alien Password Decompression

The Earth Defense Team received a mysterious encrypted message from an alien civilization. The aliens compress consecutive occurrences of a substring X into the notation \( [DX] \), where \( D \) is an integer satisfying \( 1 \le D \le 99 \) and \( X \) is the substring. This compression method may be nested (for example, \( [2[2CB]] \) represents a double compression).

Your task is to write a program to decompress the given encrypted string.

inputFormat

The input consists of a single line containing the encrypted string. The string may include nested compressed segments.

outputFormat

Output the decompressed string.

sample

ABC
ABC