a = $<.map(&:chomp) h = Hash.new(0) a.each do |c| h[c] += 1 end puts h["RED"] > h["BLUE"] ? "RED" : "BLUE"