Find the lexicographic smallest string T, satisfying T is a subsequence
of SS, but T is not a
substring of S, or determine such T doesn't exist.
The first line of each test case contains
one string S (1≤∣S∣≤10^5).
It's guaranteed that ∑∣S∣≤5×10^6.
It's guaranteed that ∑∣T∣≤2×10^6.
4
bbacb
aaabaaba
gugguggguggggu
zzzzzzzzzzzzzzzz
ab
aaaa
ggggg
-1