Given StringTM#1769

Given StringTM

5 seconds
256 megabytes
Easy

Vasyl, an employee at the renowned European Institute of Advanced Studies, finally discovered a computer at his workplace. Not being very experienced with computers, he did not use all the capabilities of this mysterious device. However, from his school days, Vasyl remembers that programmers use something called variables. Not recalling exactly how to use them, he decided to apply one as follows:

Vasyl's goal is to minimize the total number of characters, that is, |\textbf{t}| + |\textbf{g}|.

Input

The input consists of a single line containing the string s (1 \leq |\textbf{s}| \leq 10000). The string consists of lowercase Latin letters.

Output

Output the optimal set: print t on the first line and g on the second line.

Examples

Example 1

Loading
Loading