#include <iostream>
#include <string>
int main()
{
int i, j, k, length;
std::string s;
std::cin >> s;
length = s.length();
for (int i = 0; i < length; i++)
j = i;
k = 0;
if (s[i] == '<')
do k++;
while (s[j++] != '>');
}
if (k != 0)
s.erase(i, k);
length -= k;
i--;
std::cout << s;
return 0;
#include <iostream>
#include <string>
int main()
{
int i, j, k, length;
std::string s;
std::cin >> s;
length = s.length();
for (int i = 0; i < length; i++)
{
j = i;
k = 0;
if (s[i] == '<')
{
do k++;
while (s[j++] != '>');
}
if (k != 0)
{
s.erase(i, k);
length -= k;
i--;
}
}
std::cout << s;
return 0;
}