#include <cstdio>
#include <iostream>
#include <cstring>
#include <cctype>
using namespace std;
int main()
{
char c;
int times=0;
while((c=getchar())!=EOF)
{
if(isdigit(c))
{
times += c-'0';
}
else if(c=='!' || c=='\n')
{
cout << endl;
times=0;
}
else
{
int i;
for(i=0; i<times; i++)
{
if(c=='b')
cout << ' ';
else
cout << c;
}
times=0;
}
}
return 0;
}