#include <iostream>
#include <algorithm>
using namespace std;

int main()
{ 
    string s;
    cin >> s;
    
    for(int i = 0; i < s.size(); i++){ 
      if(isalpha(s[i])) {
        if(isdigit(s[i - 1])) {
          int brojka = s[i - 1] - '0';
          for(int j = 0; j < brojka;j++) {
            cout << s[i];
          }
        }
        else {
          cout << s[i];
        }
      }
    }

    return 0;
}
 