#!/bin/ruby S1 = gets.chomp S2 = gets.chomp S3 = gets.chomp puts [S1, S2, S3].group_by { |color| color }.sort {|attr1, attr2| attr1.size <=> attr2.size }.max[0]