while query = gets
  hand = query.chomp.split(",").map(&:to_i)
  cnt_max = hand.max_by{|x| hand.count(x)}
  same = hand.count(cnt_max)

  case same
  when 4
    puts "four card"

  when 3
    cnt_min = hand.min_by{|x| hand.count(x)}
    p cnt_min
    if hand.count(cnt_min) == 2
      puts "full house"
    else puts "three card"
    end

  when 2
    if hand.uniq.length == 3
      puts "two pair"
    else puts "one pair"
    end

  else
    hand.sort!
    str_flag = true
    4.times do |i|
      unless hand[i+1] - hand[i] == 1
        str_flag = false
        break
      end
    end

    if str_flag
      puts "straight"
    elsif hand == [1, 10, 11, 12, 13]
      puts "straight"
    else puts "null"
    end
  end
end