strings = [,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,
        ,]

strings.each do |str|
  seen = {}
  print 
  res =  
  str.chars.each_with_index do |c,i|
    if seen[c].nil? 
      seen[c] = i
    else
      res =  
      break
    end
  end
  puts res
end