XML is a widely used format for data exchange between different software applications. Recently, a programmer named Oleksii developed a small program that stores important information as an XML string.
An XML string is composed of opening and closing tags. An opening tag begins with a left angle bracket (), followed by a tag name, which is a non-empty string of lowercase Latin letters, and ends with a right angle bracket (). Examples of opening tags include: <a>, <dog>.
A closing tag starts with a left angle bracket, followed by a forward slash (/), the tag name (a non-empty string of lowercase Latin letters), and ends with a right angle bracket. Examples of closing tags are: </a>, </dog>.
An XML string is considered correct if it can be constructed using the following rules:
An empty string is a correct XML string.
If and are correct XML strings, then the concatenated string is also a correct XML string.
If is a correct XML string, then the string <X>A</X>, formed by enclosing with an opening tag and a matching closing tag, is also a correct XML string. Here, is any non-empty string of lowercase Latin letters.
For instance, the following strings:
<a></a> <a><ab></ab><c></c></a> <a></a><a></a><a></a>
are correct XML strings, whereas strings like:
<a></b> <a><b> <a><b></a></b>
are not correct XML strings.
Oleksii emailed a file containing the XML string to his colleague Petrov. Unfortunately, the file was corrupted during transmission: exactly one character in the string was altered.
Your task is to write a program that, given the string received by Petrov, restores the original XML string that Oleksii sent.
The input file contains a single string that can be transformed into a correct XML string by changing exactly one character. The string's length ranges from to , inclusive. It consists only of lowercase Latin letters and the symbols (ASCII code ), (ASCII code ), and (ASCII code ).
The string in the input file ends with a newline.
The output file should contain a correct XML string that can be obtained from the input string by replacing exactly one character. If there are multiple valid solutions, any one of them may be provided.
Example 1