#include<iostream>
#include<cstring>
using namespace std;
int main(){
string a;
getline(cin,a);
int Max = a.size();
char ch;
int k = 0;
for(int i = 0 ; i < Max ; i++){
if(a[i] >= 'a' && a[i] <= 'z')ch = a[i];
if(a[i] >= 'A' && a[i] <= 'Z')ch = a[i];
if(a[i] > '0' && a[i] <= '9')
{
k = a[i] - '0';
for(int j = 0 ; j < k-1 ; j ++){
cout << ch;
}
}else{
cout << ch;
}
}
return 0;
}