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