Let f(c) be the 0-based alphabetic number of a small English letter c, hence f(‘a‘)=0, f(‘b‘)=1, …, f(‘z‘)=25. The product s×t of two strings s=s_0…s_n−1 and t=t_0…t_m−1 is a string u=u_0…u_nm−1, where f(u_j⋅n+i)=(f(s_i)+f(t_j))mod26 for all i=0,…,n−1 and j=0,…,m−1. For example, ‘abc‘בde‘=‘defefg‘, ‘de‘בabc‘=‘deeffg‘, ‘xy‘בyz‘=‘vwwx‘.
You are given a string s. Find two strings a and b such that a×b=s. If there are multiple options of a and b, find the one such that the string a+b (where + stands for concatenation) is lexicographically smallest. If there are still several answers, find the one with the smallest length of a.
The only line of the input contains the string s of small English letters (1≤∣s∣≤106).
If it is impossible to find two strings a,b such that a×b=s, print −1. Otherwise, print a and b separated by a space. The string a+b should be lexicographically smallest among all suitable pairs (a,b). In case of a tie, ∣a∣ should be smallest possible.