$porkerHand = [nil,
               "one pair",
               "two pair",
               "three card",
               "full house",
               nil,
               "four card"]
arr = Array.new
while line = gets
  arr << line
end
arr.each do |i|
  a = i.split(",")
  a.map!{|j| j.to_i}
  a.sort!
  pair = 0
  a.combination(2){|a, b| pair += 1 if a == b}
  fmin = a[0]
  fmax = a[-1]
  if pair != 0
    puts $porkerHand[pair]
  elsif (fmax - fmin == 4) or a == [1, 10, 11, 12, 13]
    puts "straight"
  else
    puts "null"
  end
end