while gets do
  cs = $_.split(',').map(&:to_i)
  ch = Array.new(13){0}
  cs.each{ |i| ch[i-1] += 1 }
  str = ch.join('')
  ch.delete(0)

  case ch.sort
    when [1, 4]
      puts "four card"
    when [2, 3]
      puts "full house"
    when [1,1,1,1,1]
      puts (str =~ /1{5}/ or str =~ /10{8}1{4}/) ? "straight" : "null"
    when [1,1,3]
      puts "three card"
    when [1,2,2]
      puts "two pair"
    when [1,1,1,2]
      puts "one pair"
    else
      puts "null"
  end
end