LogiQuest

98. Run-Length Decoding

EasyStringParsing

Decode a run-length encoded string such as a3b2c1 into aaabbc. Each letter is followed by a positive count that may have several digits.

Input format

A single encoded line.

Output format

The decoded string.

Example 1

Input

a3b2c1

Output

aaabbc

Example 2

Input

x10

Output

xxxxxxxxxx

Constraints

Decoded length ≤ 10⁵

Read input from standard input and print the answer to standard output. Your code is judged against 4 test cases, most of them hidden.

Loading the MyLoginn IDE…