while line = gets do
  count = Array.new(14){0}
  (hand=line.split(",").map(&:to_i)).each{|x|
    count[x]+=1
  }
  if count.include?(4)  || count.include?(5)
    puts "four card"
  elsif count.include?(2)
    if count.include?(3)
      puts "full house"
    elsif count.index(2)!=count.rindex(2)
      puts "two pair"
    else puts "one pair"
    end
  elsif count.include?(3)
    puts "three card"
  elsif count.join=~/11111/ || count[1]==1&&count[10..13]==[1,1,1,1]
    puts "straight"
  else
    puts "null"
  end
end