$<.map{|i|a=i.split(?,).map(&:to_i).sort;c,b=a.uniq.map{|j|a.count(j)}.sort[-2..-1];puts b>3?"four card":b>2?c<2?"three card":"full house":b>1?c<2?"one pair":"two pair":a[4]-a[0]<5||a[1]>9?:straight: :null}