gets p gets.split.map(&:to_i).inject(Hash.new(0)){|h,v| h[v]+=1;h}.sort{|a,b| a[1] <=> b[1]}[-1][0]