attrs = Array.new attrs[0] = gets attrs[1] = gets attrs[2] = gets red = list.grep("RED") blue = list.grep("BLUE") if red.count==2 then puts("RED") else puts("BLUE") end