import java.util.Scanner;
/**
* @author txb
* @create 2020-10-14-16:13
*/
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String s = in.nextLine();
for (int i = 0;i<s.length();i++){
if (s.charAt(i)>='0'&&s.charAt(i)<='9'){
int t = s.charAt(i)-'0';
for (int j = 0;j<t-1;j++){
System.out.print(s.charAt(i-1));
}
}else{
System.out.print(s.charAt(i));
}
}
}
}