Problem Description

For each testcase you get string s. Output index (0-based) of first character that appears exactly once. If none, output -1.

Input Format

First line t. Next t lines strings.

Output Format

t lines indices.

Sample Test Case

Input:
3 aabbc leetcode zz
Output:
4 0 -1

Constraints

Total length

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next