#include <iostream>
#include <regex>
#include <string>
int main() {
std::string i;
std::getline(std::cin, i);
std::string tempstr = ".";
while (tempstr != "") {
int z = 0;
tempstr = "";
std::regex regex("\\d");
std::smatch match;
if (std::regex_search(i, match, regex)) {
z = std::stoi(match.str());
int f = match.position();
i.erase(f, 1);
std::string strl[z];
for (int item = 0; item < z; item++) {
strl[item] = std::string(1, i[item + f]);
z -= 1;
}
tempstr = std::accumulate(strl, strl + z, std::string(""));
i.insert(f, tempstr);
}
}
std::cout << i << std::endl;
return 0;
}