def q*a;a.delete a[0];a.empty?end
$<.map{|x|
  a,b,c,d,e=x.chop.split(",").map(&:to_i).sort;
  puts case
  when q(a,b,c,d)||q(b,c,d,e);"four card"
  when a==b&&q(c,d,e)||q(a,b,c)&&d==e;"full house"
  when (s=[a,b,c,d,e])==(a..e).to_a||s==[1,10,11,12,13];"straight"
  when q(a,b,c)||q(b,c,d)||q(c,d,e);"three card"
  when a==b&&(c==d||d==e)||b==c&&d==e;"two pair"
  when a==b||b==c||c==d||d==e;"one pair"
  else "null"
  end
}