def incremental? (card)
	(card.size-2).times {|i| return false if card[i]+1 != card[i+1]}
	return true
end

def is_straight(card)
	return true if incremental?(card) || card == [1,10,11,12,13]
	return false
end

while gets
	card = $_.split(',').map(&:to_i).sort
	next if card[0] == 0
	count = []
	5.times {|i| count[i] = card.count(card[i])}
	hand = "null"
	hand = "one pair" if count.index(2)
	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, card
end