def is_straight(card)
	(card.size-1).times do |i|
		next if card[i]+1 == card[i+1]
		next if card[-1] == 13 && is_straight(card[i+1,card.size-(i+1)])
		return false
	end
	return true
end

while gets
	card = $_.split(',').map(&:to_i).sort
	count = []
	5.times {|i| count[i] = card.count(card[i])}
	hand = "null"
	hand = "one pair" if count.index
	hand = "two pair" if count.count(2) == 4
	hand = "three card" if count.index(3)
	hand = "straight" if is_straight(card)
	hand = "full house" if count.index(2) && count.index(3)
	hand = "four card" if count.index(4)
	puts hand
end