while gets do
  a = Array.new(13,0)
  $_.split(",").map(&:to_i).each do |i|
    a[i-1]+=1
  end
  if a.member?(4) then
    puts "four card"
  elsif a.member?(2) then
    if a.member?(3) then
      puts "full house"
    elsif a.index(2) == a.rindex(2) then
      puts "one pair"
    else
      puts "two pair"
    end
  elsif a.member?(3) then
    puts "three card"
  elsif a.join =~ /1{5}/ || a.join =~ /10{8}1{4}/ then
    puts "straight"
  else
    puts "null"
  end
end