# your code goes here
class Solution(object):
    def firstUniqChar(self, s):
        """
        :type s: str
        :rtype: int
        """
        x = {}
        for i in s:
            x[i] = x.get(i,0)+1
        
        for i in range(len(s)):
            if x[s[i]] == 1:
                return i
            
        return -1
        