- Time limit: 1.00 s
- Memory limit: 512 MB
A pair of strings of equal length is called a dynamic duo if the strings have different characters in every position.
You are given a string of length n, and your task is to construct a dynamic duo using all the characters.
Input
The only input line contains a string of n characters, where n is an even number. Each character is between \texttt{A} and \texttt{Z}.
Output
If there is a dynamic duo, print two lines that describe it. If there are many possibilities, you can print any of them.
If there is no dynamic duo, print only "-1".
Constraints
- 2 \le n \le 10^6
Example 1
Input:
QQLOAL
Output:
LOL QAQ
Example 2
Input:
AAAA
Output:
-1