from collections import defaultdict


class Solution:

    def firstUniqChar(self, s: str) ->int:
        ccs = defaultdict(int)
        fi = -1
        for ch in s:
            ccs[ch] += 1
        for i, ch in enumerate(s):
            if ccs[ch] == 1:
                return i
        return -1

b18878b11f37fbc39a24949c887fb05e63b77ca0
<mask token>

<mask token>


class Solution:
    <mask token>

<mask token>


class Solution:

    def firstUniqChar(self, s: str) ->int:
        ccs = defaultdict(int)
        fi = -1
        for ch in s:
            ccs[ch] += 1
        for i, ch in enumerate(s):
            if ccs[ch] == 1:
                return i
        return -1

from collections import defaultdict


class Solution:

    def firstUniqChar(self, s: str) ->int:
        ccs = defaultdict(int)
        fi = -1
        for ch in s:
            ccs[ch] += 1
        for i, ch in enumerate(s):
            if ccs[ch] == 1:
                return i
        return -1
