Damaged XML
XML is a widely used format for data exchange between different software applications. Recently, a programmer named Ivanov 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 A and B are correct XML strings, then the concatenated string AB is also a correct XML string.
If A is a correct XML string, then the string <X>A</X>, formed by enclosing A with an opening tag and a matching closing tag, is also a correct XML string. Here, X 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.
Ivanov 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 Ivanov sent.
Input
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 7 to 1000, inclusive. It consists only of lowercase Latin letters and the symbols "<" (ASCII code 60), ">" (ASCII code 62), and "/" (ASCII code 47).
The string in the input file ends with a newline.
Output
The output file should contain a correct XML string that can be derived from the input string by replacing exactly one character. If there are multiple valid solutions, any one of them may be provided.