Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/string-siqilganni-ochish

Decompress a string

Medium 1000 ms 64 MB 56%
Share

A string is given in compressed form: every letter is followed by the number of times it repeats (for example, a3b2c1 stands for aaabbc). Restore the original string. A number may have several digits (z10 is ten letters z).

The parts of the compressed string: a letter and a number, each unpacked below

Input

One line containing the compressed string.

Output

The original string.

Note

the lengths of the compressed and the original string do not exceed $10^{5}$
the letters are lowercase Latin, the numbers are positive and have no leading zeros

Examples

Input #1
a3b2c1
Output #1
aaabbc
Input #2
z10
Output #2
zzzzzzzzzz

Sign in to submit a solution

Signing up is free and takes a minute.