P10809 [HackerEarth] dummy2
普及
题目描述

After getting their Registration IDs, now the students were curious to know the names of the various events. So, this time, the volunteers told the participants that they would be given a Special Compressed String which they are supposed to Decompress to know the particular event name. Now, each Compressed string is an alphanumeric String which is to be decompressed using the rule stated below:

Whenever you encounter a number in a string, print the part of the string preceding the number, that many times.

So, help the participants Decompress the Strings.

Input:

First line contains t, the number of test cases, then t lines follow each containing a alphanumeric string.

Output:

Print the Decompressed String

Constraints:

1 ≤ t ≤ 50

10 ≤ |s| ≤ 20

1 ≤ (numbers that appear in the string) ≤ 9

SAMPLE INPUT
2
a3
a2b3

SAMPLE OUTPUT
aaa
aabaabaab

输入格式

见题面

输出格式

见题面

样例输入
2 a3 a2b3 SAMPLE
样例输出
aaa aabaabaab