#include <iostream>
#include <algorithm>
#include <string>
#include <cctype>
#include <cstring>
bool has_any_digits(const std::string& s)
{
return std::any_of(s.begin(), s.end(), ::isdigit);
}
std::string replaceFirst(std::string word)
{
int firstPlace = (5 * (std::pow(10, 5))) + 1;
for (int i = 1; i < 10; i++)
{
if ((word.find(std::to_string(i)) < firstPlace) && (word.find(std::to_string(i)) != std::string::npos) && std::isalpha(word.substr(word.find(std::to_string(i)), 1)[0]) == 0)
{
firstPlace = int(word.find(std::to_string(i)));
}
}
word = word.replace(firstPlace, 1, word.substr(firstPlace + 1, stoi(word.substr(firstPlace, 1))));
return word;
}
//98abcdefghijk54lmnopqrstuvw65xyz987ABCDE43FGHI987JKLMN654OPQRSTU765VWXYZ+-
int main()
{
std::string word = "";
std::cin >> word;
while (has_any_digits(word))
{
word = replaceFirst(word);
}
std::cout << word;
}