#include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
int outputLen = 0;
cin >> s;
int len = 0;
for(int i = 0; i < (int)s.size(); i++)
{
if(isdigit(s[i]))
len = 10 * len + s[i] - '0';
else
{
cout << string(len, s[i]);
outputLen += len;
len = 0;
}
}
cout << "\n";
return 0;
}