Problem I. The Picture Drawing

Author:Южно-Уральский открытый командный чемпионат   Time limit:5 sec
Input file:input.txt   Memory limit:64 Mb
Output file:output.txt  

Statement

Your mission, if you decide to accept it, is to create a picture drawing program. A picture will consist of the alphabetic characters A-Z and spaces.

Input file format

Your program will get the information for the picture from the input file. This file will contain lines of characters which your program must interpret to draw a picture. Each row of the picture will be described by a series of numbers and characters, where the numbers before a character tell how many times that character will be used. If there are multiple digits in a number before a character, then the number of times to repeat the character is the sum of the digits before that character.

The character "." (dot) will be used in the input file to represent spaces in the picture. The descriptions for different rows in the picture will be separated by an end of line.

The input file will be terminated by an end of file.

Constraints

There is no limit to the number of rows in a picture, though no row will contain more than 200 characters.

Sample tests

No. Input file (input.txt) Output file (output.txt)
1
2X3.1X
13X1.1X
XX   X
XXXX X

0.046s 0.007s 13