You are given a single line containing a string s made of lowercase English letters. A character is unique if it appears exactly once in s.
Find the leftmost unique character and print its 0-based index. If no character is unique (or the string is empty), print -1.
Input format
A single line containing the string s. The line may be empty, in which case s is the empty string.
Output format
A single integer: the 0-based index of the first unique character, or -1 if there is no unique character.
Constraints
- 0 ≤ length of
s≤ 100000 sconsists only of lowercase English letters (a–z).