#include <iostream>
#include <algorithm>
#include <iomanip>
#include <math.h>
#include <string>
#include <string.h>
#include <vector>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <queue>
#include <bitset>
#include <list>
#include <stack>
#define ll long long
#define pii pair<int,int>
#define ull unsigned long long
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
char c,t;
while((c=getchar())!='\n'){
if(isalpha(c)){
cout << c;
t = c;
}else if(isalnum(c)){
int x = c-'0';
for(int i =0;i<x-1;i++){
cout << t;
}
}else{
cout << c;
}
}
return 0;
}