$<.each_line do |l|
  cs = l.split(?,).map(&:to_i)
  case
  when cs.any? {|c| cs.count {|d| c == d } == 4 }
    puts 'four card'
  when cs.any? {|c| cs.count {|d| c == d } == 3 } && cs.any? {|c| cs.count {|d| c == d } == 2 }
    puts 'full house'
  when cs.sort == (cs.min..cs.max).to_a || cs.sort == [1, 10, 11, 12, 13]
    puts 'straight'
  when cs.any? {|c| cs.count {|d| c == d } == 3 }
    puts 'three card'
  when cs.uniq.size == 3
    puts 'two pair'
  when cs.uniq.size == 4
    puts 'one pair'
  else
    puts 'null'
  end
end