while gets
  cards = $_.split(',').map(&:to_i)
  count_list = Array.new(13, 0)
  cards.each { |i| count_list[i-1] += 1 }
  st = count_list.join
  count_list.delete(0)
  count_list = count_list.sort

  if count_list == [1, 4]
    puts 'four pair'
  elsif count_list == [2, 3]
    puts 'full house'
  elsif count_list == [1, 1, 3]
    puts 'three pair'
  elsif count_list == [1, 2, 2]
    puts 'two pair'
  elsif count_list == [1, 1, 1, 2]
    puts 'one pair'
  elsif st =~ /(1{5}|10{8}1{4})/
    puts 'straight'
  else
    puts 'null'
  end
end