Find the first character that appears exactly once in the string and return its index.
Input: one lowercase string. Output: the 0-based index, or -1 if every character repeats.
-1
Your program reads from stdin and prints to stdout.
Example 1
Input: leetcode
Output: 0
Hints