King Bradley has issued Order 3066 allowing the use of State Alchemists (SA) as Human Weapons. The number of Military Police (MP) is same as the number of the SAs. An MP and SA are taken to form a pair and given a code letter based on their skill level using a lowercase English letter. Before the war, all the pairs are arranged in a certain order. (For eg, xyz)
During the war the following strategy is used:
Given the order they were ultimately released on the battlefield, find the order they were initially arranged in as pairs keeping it lexicographically the smallest.
Input Format:
A single string containing the final order they were released in.
Constraints:
Output Format:
A single string containing the original order they were kept in as pairs
If the given initial ordering of the pairs is yzx, then
If the initial ordering is considered as xyz or xzy or yxz, then there is no way we can release them in the order given in the question. Hence the lexicographically smallest possible initial order is yzx.