1. JAVA, Peter Schnitzler

/* Problem : 445
* Author : Peter Schnitzler
* Status : AC
* Runtime : 0.07
*/

import java.io.BufferedInputStream;


public class Main
{

public static void main(String[] args) throws Exception
{
BufferedInputStream input = new BufferedInputStream(System.in);

int in = input.read();
int sum = 0; //how many of any letter are in a row
StringBuilder output = new StringBuilder(); //collecting the output

while (in != -1)
{

//numbers
if (in <= 57 && in >= 48)
{
sum += (in - 48);
}


//letters + "*"
if (in == 42 || (in >= 97 && in <= 122) || (in <= 90 && in >= 65))
{
if (in == 98)
{
in = 32;
}


for (int count = 0; count < sum; count++)
{
output.append((char)in);
}

sum = 0;
}

//newline
if (in == 13)
{
in = input.read();
}

//carriage return and "!"
if (in == 10 || in == 33)
{
output.append("\n");
}


in = input.read();
}

System.out.print(output.toString());

}

}