#K79912. Decompress a Compressed Sequence

    ID: 35414 Type: Default 1000ms 256MiB

Decompress a Compressed Sequence

Decompress a Compressed Sequence

Given a compressed sequence where each segment consists of a positive integer immediately followed by a character (for example, 3a represents aaa), your task is to decompress the sequence.

The segments are separated by spaces. For instance, if the input is 3a 2b 4c, the expected output would be aaabbcccc.

Please note that the input will be provided via stdin and the output should be printed to stdout.

inputFormat

A single line is given from stdin. This line contains one or more compressed segments separated by spaces. Each segment consists of a positive integer (which may have multiple digits) immediately followed by a character.

outputFormat

Output a single line to stdout representing the decompressed sequence by expanding each segment into a sequence of repeated characters.## sample

3a 2b 4c
aaabbcccc