Create a program that reads poker hand data and outputs the role for each. However, this issue follows the rules below.

* Poker is a competition with 5 playing cards.
* No more than 5 cards with the same number.
* There is no joker.
* Suppose you only consider the following poker roles: (The higher the number, the higher the role.)


1. No role (does not apply to any of the following)
2. One pair (two cards with the same number)
3. Two pairs (two pairs of cards with the same number)
4. Three cards (one set of three cards with the same number)
5. Straight (the numbers on 5 cards are consecutive)
However, in the case of a straight containing A, the sequence ending with A is also straight. In other words, there are two types of straights containing A: A 2 3 4 5 and 10 J Q K A. Lines that straddle A, such as J Q K A 2, are not straight. (In this case, it will be "no role").
6. Full House (one set of three cards with the same number and the other two cards with the same number)
7. Four Cards (one set of four cards with the same number)



Input

The input consists of multiple datasets. Each dataset is given in the following format:


Hand 1, Hand 2, Hand 3, Hand 4, Hand 5


In your hand, Trump's J (jack) is 11, Q (queen) is 12, K (king) is 13, A (ace) is 1, and the others are represented by their respective numbers.

The number of datasets does not exceed 50.

Output

For each dataset, output one of the highest roles you can play in your hand. Follow the output example for the notation of the role.

Example

Input

1,2,3,4,1
2,3,2,3,12
12,13,11,12,12
7,6,7,6,7
3,3,2,3,3
6,7,8,9,10
11,12,10,1,13
11,12,13,1,2


Output

one pair
two pair
three card
full house
four card
straight
straight
null

Source: aizu | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
try:
	while True:
		a: list = sorted(map(int, input().split(',')))
		if a.count(a[0]) == 4 or a.count(a[1]) == 4:
			print('four card')
		elif len(set(a)) == 2:
			print('full house')
		elif a[0] + 4 == a[1] + 3 == a[2] + 2 == a[3] + 1 == a[4] or a == [1, 10, 11, 12, 13]:
			print('straight')
		elif max(a.count(a[0]), a.count(a[1]), a.count(a[2])) == 3:
			print('three card')
		elif len(set(a)) == 3:
			print('two pair')
		elif len(set(a)) == 4:
			print('one pair')
		else:
			print('null')
except EOFError:
	exit()


def fourcard(card):
	if card.count(card[0]) == 4 or card.count(card[1]) == 4:
		return True
	else:
		return False

def fullhouse(card):
	card.sort()
	if card[0] == card[1] == card[2] and card[3] == card[4] or (card[0] == card[1] and card[2] == card[3] == card[4]):
		return True
	else:
		return False

def straight(card):
	card.sort()
	if card[0] == 1 and card[1] == 10 and (card[2] == 11) and (card[3] == 12) and (card[4] == 13):
		return True
	else:
		ans = 'True'
		for i in range(4):
			if card[i] + 1 != card[i + 1]:
				ans = False
		if ans == 'True':
			return True
		else:
			return False

def threecard(card):
	if card.count(card[0]) == 3 or card.count(card[1]) == 3 or card.count(card[2]) == 3:
		return True
	else:
		return False

def twopair(card):
	card.sort()
	if card[0] == card[1]:
		if card[2] == card[3] or card[3] == card[4]:
			return True
	elif card[1] == card[2]:
		if card[3] == card[4]:
			return True
	else:
		return False

def onepair(card):
	card.sort()
	if card[0] == card[1] or card[1] == card[2] or card[2] == card[3] or (card[3] == card[4]):
		return True
	else:
		return False
while True:
	try:
		card = list(map(int, input().split(',')))
	except EOFError:
		break
	if fourcard(card):
		print('four card')
	elif fullhouse(card):
		print('full house')
	elif straight(card):
		print('straight')
	elif threecard(card):
		print('three card')
	elif twopair(card):
		print('two pair')
	elif onepair(card):
		print('one pair')
	else:
		print('null')


while True:
	try:
		Size = []
		Card_Lis = list(map(int, input().split(',')))
		Card_Lis.sort()
		for tag in sorted(set(Card_Lis), key=Card_Lis.index):
			Size.append(Card_Lis.count(tag))
		Size.sort()
		if max(Size) == 4:
			print('four card')
		elif Size == [2, 3]:
			print('full house')
		elif max(Size) == 3:
			print('three card')
		elif Size == [1, 2, 2]:
			print('two pair')
		elif max(Size) == 2:
			print('one pair')
		elif max(Size) == 1:
			if Card_Lis[0] == 1:
				if Card_Lis == [1, 2, 3, 4, 5] or Card_Lis == [1, 10, 11, 12, 13]:
					print('straight')
				else:
					print('null')
			elif Card_Lis[0] + 4 == Card_Lis[4]:
				print('straight')
			else:
				print('null')
	except EOFError:
		break


def s(n):
	sum = 0
	for i in range(14):
		if n[i] == 1:
			sum += i
	if sum % 5 == 0 or sum == 47:
		return True
	return False
while True:
	try:
		l = map(int, input().split(','))
	except:
		break
	n = [0] * 14
	for i in l:
		n[i] += 1
	if 4 in n:
		print('four card')
	elif 3 in n and 2 in n:
		print('full house')
	elif 3 in n:
		print('three card')
	elif 2 == n.count(2):
		print('two pair')
	elif 2 in n:
		print('one pair')
	elif s(n):
		print('straight')
	else:
		print('null')


while True:
	try:
		cards = list(map(int, input().split(',')))
	except:
		break
	cards.sort()
	if cards.count(cards[2]) == 4:
		print('four card')
	elif cards.count(cards[2]) == 3:
		if cards[0] == cards[1] and cards[3] == cards[4]:
			print('full house')
		else:
			print('three card')
	elif cards[1] < cards[2] < cards[3] < cards[4] and cards[4] - cards[1] == 3 and (cards[0] == cards[4] - 4 or cards[0] == cards[4] - 12):
		print('straight')
	elif cards[0] == cards[1] and (cards[2] == cards[3] or cards[3] == cards[4]) or (cards[1] == cards[2] and cards[3] == cards[4]):
		print('two pair')
	elif max((cards.count(cards[i]) for i in range(5))) == 2:
		print('one pair')
	else:
		print('null')


while True:
	try:
		temp = [int(_) for _ in input().split(',')]
		length = len(set(temp))
		if length == 2:
			if temp.count(temp[0]) == 1 or temp.count(temp[0]) == 4:
				print('four card')
			else:
				print('full house')
		elif length == 3:
			for _ in set(temp):
				if temp.count(_) == 2:
					print('two pair')
					break
				elif temp.count(_) == 3:
					print('three card')
					break
		elif length == 4:
			print('one pair')
		else:
			temp.sort(reverse=True)
			test = [temp[0] - _ for _ in range(5)]
			if temp == test or temp == [13, 12, 11, 10, 1]:
				print('straight')
			else:
				print('null')
	except:
		break


from collections import Counter

def is_straight(game):
	if 1 in game:
		if game == [1, 2, 3, 4, 5] or game == [1, 10, 11, 12, 13]:
			return True
		else:
			return False
	else:
		for i in range(len(game) - 1):
			if game[i + 1] != game[i] + 1:
				return False
			return True
while True:
	try:
		start = input()
	except:
		break
	game = list(map(int, start.split(',')))
	game.sort()
	result = Counter(game)
	(values, counts) = zip(*result.most_common())
	if counts[0] == 2:
		if len(counts) == 4:
			print('one pair')
		else:
			print('two pair')
	elif counts[0] == 3:
		if len(counts) == 3:
			print('three card')
		else:
			print('full house')
	elif counts[0] == 4:
		print('four card')
	elif is_straight(game):
		print('straight')
	else:
		print('null')


while True:
	try:
		A = sorted(list(map(int, input().split(','))))
		_sum = 0
		_max = 0
		for i in range(1, 14):
			tmp = A.count(i)
			if tmp > 1:
				_sum += tmp
			_max = max(_max, tmp)
		if _max == 4:
			print('four card')
		elif _max == 3 and _sum == 5:
			print('full house')
		elif A.count(1) == 1 and (A[0] == 1 and A[2] - 1 == A[3] - 2 == A[4] - 3 == A[1]) or (A[4] == 1 and A[1] - 1 == A[2] - 2 == A[3] == A[0]):
			print('straight')
		elif A[1] - 1 == A[2] - 2 == A[3] - 3 == A[4] - 4 == A[0]:
			print('straight')
		elif _max == 3:
			print('three card')
		elif _sum == 4:
			print('two pair')
		elif _max == 2:
			print('one pair')
		else:
			print('null')
	except:
		break


from collections import Counter
while True:
	try:
		card = list(map(int, input().split(',')))
	except:
		break
	counter = Counter(card)
	mc = counter.most_common()
	if len(mc) == 2:
		if mc[0][1] == 4:
			print('four card')
		else:
			print('full house')
	elif len(mc) == 3:
		if mc[0][1] == 3:
			print('three card')
		else:
			print('two pair')
	elif len(mc) == 4:
		print('one pair')
	else:
		t = sorted([mc[i][0] for i in range(len(mc))])
		if t[4] - t[3] == t[3] - t[2] == t[2] - t[1] and (t[1] - t[0] or (t[0] == 1 and t[4] == 13)):
			print('straight')
		else:
			print('null')


import sys
f = sys.stdin
for line in f:
	c = sorted(list(map(int, line.strip().split(','))))
	if c[0] == c[3] or c[1] == c[4]:
		print('four card')
	elif c[0] == c[2] and c[3] == c[4] or (c[0] == c[1] and c[2] == c[4]):
		print('full house')
	elif c[0] == c[2] or c[1] == c[3] or c[2] == c[4]:
		print('three card')
	else:
		cnt = 0
		for i in range(4):
			if c[i] == c[i + 1]:
				cnt += 1
		if cnt == 2:
			print('two pair')
		elif cnt == 1:
			print('one pair')
		elif c == [1, 10, 11, 12, 13] or c[0] == c[1] - 1 == c[2] - 2 == c[3] - 3 == c[4] - 4:
			print('straight')
		else:
			print('null')


import sys
from collections import Counter

class Poker(object):

	def __init__(self, cards):
		self.cards = cards[:]
		self.cards.sort(reverse=True)

	def evaluate_hand(self):
		if self.cards[0] == self.cards[1] + 1 == self.cards[2] + 2 == self.cards[3] + 3 == self.cards[4] + 4 or (self.cards[0] == 13 and self.cards[1] == 12 and (self.cards[2] == 11) and (self.cards[3] == 10) and (self.cards[4] == 1)):
			return 'straight'
		else:
			c = Counter(self.cards)
			hand = c.most_common()
			if hand[0][1] == 4:
				return 'four card'
			elif hand[0][1] == 3 and hand[1][1] == 2:
				return 'full house'
			elif hand[0][1] == 3:
				return 'three card'
			elif hand[0][1] == 2 and hand[1][1] == 2:
				return 'two pair'
			elif hand[0][1] == 2:
				return 'one pair'
			else:
				return 'null'
for line in sys.stdin:
	cards = [int(x) for x in line.strip().split(',')]
	p1 = Poker(cards)
	result = p1.evaluate_hand()
	print(result)


from collections import Counter

def is_strait(_cnt):
	f = 0
	for i in range(14):
		if _cnt[i % 13 + 1] == 1:
			f += 1
			if f == 5:
				return True
		else:
			f = 0
	return False
try:
	while 1:
		cnt = Counter(map(int, input().split(',')))
		mc = cnt.most_common(2)
		if mc[0][1] == 4:
			print('four card')
		elif mc[0][1] == 3 and mc[1][1] == 2:
			print('full house')
		elif mc[0][1] == 3:
			print('three card')
		elif mc[0][1] == mc[1][1] == 2:
			print('two pair')
		elif mc[0][1] == 2:
			print('one pair')
		elif is_strait(cnt):
			print('straight')
		else:
			print('null')
except:
	pass


def function(a, b, c, d, e):
	A = [a, b, c, d, e]
	A.sort()
	if A[0] == A[3] or A[1] == A[4]:
		print('four card')
	elif A[0] == A[1] and A[2] == A[4] or (A[0] == A[2] and A[3] == A[4]):
		print('full house')
	elif A[0] == A[2] or A[1] == A[3] or A[2] == A[4]:
		print('three card')
	elif A[0] == A[1] and A[2] == A[3] or (A[0] == A[1] and A[3] == A[4]) or (A[1] == A[2] and A[3] == A[4]):
		print('two pair')
	elif A[0] == A[1] or A[1] == A[2] or A[2] == A[3] or (A[3] == A[4]):
		print('one pair')
	elif A == [1, 10, 11, 12, 13]:
		print('straight')
	elif A[0] == A[1] - 1 == A[2] - 2 == A[3] - 3 == A[4] - 4:
		print('straight')
	else:
		print('null')
while True:
	try:
		(a, b, c, d, e) = map(int, input().split(','))
		function(a, b, c, d, e)
	except EOFError:
		break


straight = [[i for i in range(j, j + 5)] for j in range(1, 10)]
straight.append([1, 10, 11, 12, 13])
while True:
	try:
		h = list(map(int, input().split(',')))
		h_s = sorted(h)
		p = []
		for i in range(4):
			if h_s[i] != h_s[i + 1]:
				p.append(i)
		if len(p) == 1:
			if p[0] == 0 or p[0] == 3:
				print('four card')
			else:
				print('full house')
		elif h_s in straight:
			print('straight')
		elif len(p) == 2:
			if p[0] == 1 or p == [0, 2]:
				print('two pair')
			else:
				print('three card')
		elif len(p) == 3:
			print('one pair')
		else:
			print('null')
	except:
		break


from collections import Counter
import sys
for line in sys.stdin:
	card = sorted(list(map(int, line.split(','))))
	pair = Counter(card).most_common()
	if pair[0][1] == 4:
		print('four card')
	elif pair[0][1] == 3 and pair[1][1] == 2:
		print('full house')
	elif pair[0][1] == 3:
		print('three card')
	elif pair[0][1] == pair[1][1] == 2:
		print('two pair')
	elif pair[0][1] == 2:
		print('one pair')
	elif [x - card[0] for x in card] == [0, 1, 2, 3, 4] or card == [1, 10, 11, 12, 13]:
		print('straight')
	else:
		print('null')


import sys

def checkPairs(cards):
	result = {}
	for card in cards:
		if cards.count(card) >= 2:
			result.update({card: cards.count(card)})
	keysNum = len(result.keys())
	values = list(result.values())
	if keysNum == 0:
		return 'null'
	elif keysNum == 2:
		if values.count(3) > 0:
			return 'full house'
		else:
			return 'two pair'
	elif values.count(4) > 0:
		return 'four card'
	elif values.count(3) > 0:
		return 'three card'
	else:
		return 'one pair'

def checkStraight(cards):
	if cards.count(1) > 0:
		if cards[1] == 10 and cards[2] == 11 and (cards[3] == 12) and (cards[4] == 13):
			return True
	if cards[0] == cards[1] - 1 and cards[1] == cards[2] - 1 and (cards[2] == cards[3] - 1) and (cards[3] == cards[4] - 1):
		return True
	else:
		return False
for line in sys.stdin:
	try:
		cards = [int(i) for i in line.split(',')]
		cards.sort()
		result = checkPairs(cards)
		if result == 'full house' or result == 'four card':
			print(result)
		else:
			print('straight' if checkStraight(cards) else result)
	except:
		break


import sys
from collections import Counter
straight = [list(range(i, i + 5)) for i in range(1, 10)] + [[1, 10, 11, 12, 13]]

def hantei(hand):
	l = sorted(Counter(hand).values(), reverse=True)
	if l[0] == 4:
		return 'four card'
	if l[0] == 3 and l[1] == 2:
		return 'full house'
	if hand in straight:
		return 'straight'
	if l[0] == 3:
		return 'three card'
	if l[0] == l[1] == 2:
		return 'two pair'
	if l[0] == 2:
		return 'one pair'
	return 'null'
for line in sys.stdin:
	hand = sorted(map(int, line.split(',')))
	print(hantei(hand))


import sys
for e in sys.stdin:
	e = sorted(map(int, e.split(',')))
	print([['null', 'straight'][e[0] * 9 < e[1] or e[4] - e[0] < 5], 'one pair', 'two pair', 'three card', 'full house', 0, 'four card'][sum((e.count(s) for s in e)) // 2 - 2])


import sys
import os
for s in sys.stdin:
	A = list(map(int, s.split(',')))
	A.sort()
	if A[0] == A[1] == A[2] == A[3] or A[1] == A[2] == A[3] == A[4]:
		print('four card')
	elif A[0] == A[1] == A[2] and A[3] == A[4]:
		print('full house')
	elif A[0] == A[1] and A[2] == A[3] == A[4]:
		print('full house')
	elif A[0] == A[1] - 1 == A[2] - 2 == A[3] - 3 == A[4] - 4:
		print('straight')
	elif A[1] == 10 and A[2] == 11 and (A[3] == 12) and (A[4] == 13) and (A[0] == 1):
		print('straight')
	elif A[0] == A[1] == A[2] or A[1] == A[2] == A[3] or A[2] == A[3] == A[4]:
		print('three card')
	elif A[0] == A[1] and A[2] == A[3] or (A[0] == A[1] and A[3] == A[4]) or (A[1] == A[2] and A[3] == A[4]):
		print('two pair')
	elif A[0] == A[1] or A[1] == A[2] or A[2] == A[3] or (A[3] == A[4]):
		print('one pair')
	else:
		print('null')


import collections
while 1:
	try:
		hand = list(map(int, input().split(',')))
	except:
		break
	chand = collections.Counter(hand)
	count = chand.most_common()
	straight = [1, 10, 11, 12, 13]
	if count[0][1] == 4:
		print('four card')
		continue
	elif count[0][1] == 3 and count[1][1] == 2:
		print('full house')
		continue
	else:
		hand.sort()
		if hand == straight:
			print('straight')
			continue
		else:
			check = True
			for i in range(len(hand) - 1):
				if hand[i + 1] - hand[i] != 1:
					check = False
			if check:
				print('straight')
				continue
	if count[0][1] == 3:
		print('three card')
		continue
	elif count[0][1] == count[1][1] == 2:
		print('two pair')
		continue
	elif count[0][1] == 2:
		print('one pair')
		continue
	else:
		print('null')


straight = '12345678910111213110111213'
while True:
	try:
		lst = list(map(int, input().split(',')))
		lst.sort()
		clst = []
		for i in lst:
			clst.append(lst.count(i))
		if clst.count(4) == 4:
			print('four card')
		elif clst.count(3) == 3:
			if clst.count(2) == 2:
				print('full house')
			else:
				print('three card')
		elif clst.count(2) == 4:
			print('two pair')
		elif clst.count(2) == 2:
			print('one pair')
		else:
			s = str(lst[0]) + str(lst[1]) + str(lst[2]) + str(lst[3]) + str(lst[4])
			if s in straight:
				print('straight')
			else:
				print('null')
	except EOFError:
		break


import sys
for e in sys.stdin:
	e = list(map(int, e.split(',')))
	c = [e.count(i + 1) for i in range(13)]
	d = c + c
	if 4 in c:
		s = 'four card'
	elif 3 in c:
		if 2 in c:
			s = 'full house'
		else:
			s = 'three card'
	elif 2 in c:
		if c.count(2) - 1:
			s = 'two pair'
		else:
			s = 'one pair'
	elif sum(([1] * 5 == d[i:i + 5] for i in range(10))):
		s = 'straight'
	else:
		s = 'null'
	print(s)


N = 13
while True:
	try:
		A = list(map(int, input().split(',')))
	except EOFError:
		break
	flag = False
	for i in range(1, N + 1):
		if A.count(i) == 4:
			flag = True
			print('four card')
			break
	if flag:
		continue
	for i in range(1, N + 1):
		for j in range(1, N + 1):
			if i == j:
				continue
			if A.count(i) == 3 and A.count(j) == 2:
				flag = True
				print('full house')
				break
		if flag:
			break
	if flag:
		continue
	for i in range(1, 11):
		cnt = 0
		for j in range(0, 5):
			if i + j == 14:
				cnt += A.count(1) > 0
			else:
				cnt += A.count(i + j) > 0
		if cnt == 5:
			flag = True
			print('straight')
			break
	if flag:
		continue
	for i in range(1, N + 1):
		if A.count(i) == 3:
			flag = True
			print('three card')
			break
	if flag:
		continue
	for i in range(1, N + 1):
		for j in range(1, N + 1):
			if i == j:
				continue
			if A.count(i) == 2 and A.count(j) == 2:
				flag = True
				print('two pair')
				break
		if flag:
			break
	if flag:
		continue
	for i in range(1, N + 1):
		if A.count(i) == 2:
			flag = True
			print('one pair')
			break
	if flag:
		continue
	print('null')


def chk_all(A):
	s_A = set(A)
	B = list(s_A)
	leng = len(s_A)
	if leng == 2:
		if A.count(B[0]) == 4 or A.count(B[1]) == 4:
			return 'four card'
		else:
			return 'full house'
	elif leng == 3:
		if A.count(B[0]) == 3 or A.count(B[1]) == 3 or A.count(B[2]) == 3:
			return 'three card'
		else:
			return 'two pair'
	elif leng == 4:
		return 'one pair'
	else:
		A = sorted(A)
		if A[0] == 1 and A[1] == 10 and (A[2] == 11) and (A[3] == 12) and (A[4] == 13):
			return 'straight'
		for i in range(1, 5):
			if A[i] - A[i - 1] != 1:
				return 'null'
		return 'straight'
	return 'null'
while True:
	try:
		A = list(map(int, input().split(',')))
		print(chk_all(A))
	except EOFError:
		break


import sys
for e in sys.stdin:
	e = sorted(map(int, e.split(',')))
	print([['null', 'straight'][e[0] * 10 == e[1] or e[4] - e[0] == 4], 'one pair', 'two pair', 'three card', 'full house', 0, 'four card'][sum((e.count(s) for s in e)) // 2 - 2])


import re
chars = {'10': 'D', '11': 'J', '12': 'Q', '13': 'K'}
while True:
	try:
		f = sorted(map(int, input().strip().split(',')))
		g = list(map(str, f.copy()))
		for i in chars.keys():
			while i in g:
				g[g.index(i)] = chars[i]
		h = ''.join(g)
		if re.search('(.)\\1\\1\\1', h):
			print('four card')
		elif re.search('(.)\\1\\1(.)\\2', h) or re.search('(.)\\1(.)\\2\\2', h):
			print('full house')
		elif f[1] == f[0] + 1 and f[2] == f[0] + 2 and (f[3] == f[0] + 3) and (f[4] == f[0] + 4) or h == '1DJQK':
			print('straight')
		elif re.search('(.)\\1\\1', h):
			print('three card')
		elif re.search('(.)\\1.?(.)\\2', h):
			print('two pair')
		elif re.search('(.)\\1', h):
			print('one pair')
		else:
			print('null')
	except EOFError:
		break


words = [['null', 'one pair', 'three card', 'four card'], ['', '', 'two pair', 'full house']]
while True:
	try:
		cards = list((int(x) for x in input().split(',')))
		cards = sorted(cards, reverse=False)
		isStright = True
		pairCard = -1
		pairNum = 0
		pairIndex = 0
		tmp = cards[0]
		for i in range(1, 5):
			if tmp + 1 != cards[i]:
				isStright = False
			if tmp == cards[i]:
				if pairNum >= 1 and pairCard != cards[i]:
					pairIndex = 1
				pairNum += 1
				pairCard = cards[i]
			tmp = cards[i]
		if isStright or (cards[0] == 1 and cards[1] == 10 and (cards[2] == 11) and (cards[3] == 12) and (cards[4] == 13)):
			ans = 'straight'
		else:
			ans = words[pairIndex][pairNum]
		print(ans)
	except:
		break


import sys

def is_onepair(x):
	for i in range(4):
		if x.count(x[i]) == 2:
			return True
	return False

def is_twopair(x):
	count = 0
	i = 0
	x.sort()
	while i < 5:
		if x.count(x[i]) == 2:
			i += 2
			count += 1
		else:
			i += 1
		if count == 2:
			return True
	return False

def is_threecard(x):
	for i in range(3):
		if x.count(x[i]) == 3:
			return True
	return False

def is_straight(x):
	x.sort()
	if x[0] == 1 and x[1:] == [10, 11, 12, 13]:
		return True
	for i in range(4):
		if x[i] + 1 != x[i + 1]:
			return False
	return True

def is_fullhouse(x):
	if is_threecard(x) and is_onepair(x):
		return True
	return False

def is_fourcard(x):
	for i in range(2):
		if x.count(x[i]) == 4:
			return True
	return False
for line in sys.stdin.readlines():
	hand = list(map(int, line.split(',')))
	if is_fourcard(hand):
		print('four card')
	elif is_fullhouse(hand):
		print('full house')
	elif is_straight(hand):
		print('straight')
	elif is_threecard(hand):
		print('three card')
	elif is_twopair(hand):
		print('two pair')
	elif is_onepair(hand):
		print('one pair')
	else:
		print('null')


while True:
	try:
		cards = list(map(int, input().split(',')))
		cards.sort()
		if len(set(cards)) == 5:
			c = cards[0]
			if cards == [c, c + 1, c + 2, c + 3, c + 4]:
				print('straight')
			elif cards == [1, 10, 11, 12, 13]:
				print('straight')
			else:
				print('null')
		elif len(set(cards)) == 2:
			t = cards.count(cards[0])
			if t == 1 or t == 4:
				print('four card')
			else:
				print('full house')
		elif len(set(cards)) == 3:
			flag = True
			i = 0
			while flag:
				c = cards[i]
				if cards.count(c) == 3:
					print('three card')
					flag = False
				if cards.count(c) == 2:
					print('two pair')
					flag = False
				i += 1
		else:
			print('one pair')
	except:
		break


from itertools import permutations
import sys
import os

def inini(_card):
	for i in range(len(_card)):
		_card[i] = 0

def main():
	for s in sys.stdin:
		card = 14 * [0]
		inini(card)
		number = list(map(int, s.split(',')))
		for v in number:
			card[v] += 1
		one_pair = 0
		tree_card = 0
		four_card = 0
		for value in sorted(set(number), key=number.index):
			if card[value] == 2:
				one_pair += 1
			elif card[value] == 3:
				tree_card += 1
			elif card[value] == 4:
				four_card += 1
		number.sort()
		if one_pair == 1 and tree_card == 1:
			print('full house')
		elif one_pair == 1:
			print('one pair')
		elif one_pair == 2:
			print('two pair')
		elif tree_card == 1:
			print('three card')
		elif four_card == 1:
			print('four card')
		elif number[0] == number[1] - 1 == number[2] - 2 == number[3] - 3 == number[4] - 4:
			print('straight')
		elif number[0] == 1 and number[1] == 10 and (number[2] == 11) and (number[3] == 12) and (number[4] == 13):
			print('straight')
		else:
			print('null')
main()


def function(a, b, c, d, e):
	A = [a, b, c, d, e]
	A.sort()
	if A[0] == A[3] or A[1] == A[4]:
		print('four card')
	elif A[0] == A[1] and A[2] == A[4] or (A[0] == A[2] and A[3] == A[4]):
		print('full house')
	elif A[0] == A[2] or A[1] == A[3] or A[2] == A[4]:
		print('three card')
	elif A[0] == A[1] and A[2] == A[3] or (A[0] == A[1] and A[3] == A[4]) or (A[1] == A[2] and A[3] == A[4]):
		print('two pair')
	elif A[0] == A[1] or A[1] == A[2] or A[2] == A[3] or (A[3] == A[4]):
		print('one pair')
	elif A == [1, 10, 11, 12, 13]:
		print('straight')
	elif A[0] == A[1] - 1 == A[2] - 2 == A[3] - 3 == A[4] - 4:
		print('straight')
	else:
		print('null')
while True:
	try:
		(a, b, c, d, e) = map(int, input().split(','))
		function(a, b, c, d, e)
	except EOFError:
		break


import sys
for e in sys.stdin:
	e = sorted(map(int, e.split(',')))
	n = sum((e.count(s) for s in e)) - 5
	print([['null', 'straight'][e[4] - e[0] == 4 or e[0] * 10 == e[1]], 'one pair', 'two pair', 'three card', 'full house', 0, 'four card'][n // 2])


from collections import Counter

def checkStraint(hand):
	hand = sorted(hand)
	if set(hand) == set([10, 11, 12, 13, 1]):
		return True
	for i in range(5):
		if hand[0] + i == hand[i]:
			continue
		else:
			return False
	return True
while True:
	try:
		hand = [int(i) for i in input().split(',')]
		hand = sorted(hand)
		c = Counter(hand)
		c = sorted(dict(c).items(), key=lambda w: w[1], reverse=True)
		if c[0][1] == 4:
			print('four card')
			continue
		elif c[0][1] == 3 and c[1][1] == 2:
			print('full house')
			continue
		elif checkStraint(hand):
			print('straight')
			continue
		elif c[0][1] == 3:
			print('three card')
			continue
		elif c[0][1] == 2 and c[1][1] == 2:
			print('two pair')
			continue
		elif c[0][1] == 2:
			print('one pair')
			continue
		else:
			print('null')
	except EOFError:
		break


def isstraight(cs):
	if 1 in cs:
		if cs == [1, 2, 3, 4, 5] or cs == [1, 10, 11, 12, 13]:
			return True
		else:
			return False
	else:
		for i in range(len(cs) - 1):
			if cs[i + 1] != cs[i] + 1:
				return False
		return True
while 1:
	try:
		c = list(map(int, input().split(',')))
	except:
		break
	l = [c.count(i) for i in set(c)]
	ans = {7: 'four card', 6: 'full house', 5: 'straight', 4: 'three card', 3: 'two pair', 2: 'one pair', 1: 'null'}
	if len(set(c)) == 5:
		v = 5 if isstraight(sorted(c)) else 1
	else:
		v = 7 if 4 in l else 6 if 3 in l and 2 in l else 4 if 3 in l else 3 if l.count(2) == 2 else 2
	print(ans[v])


def hand(card):
	m = 0
	n = [0] * 13
	val = 0
	for i in range(13):
		n[i] = card.count(str(i + 1))
	for i in range(13):
		if n[i] == 4:
			return 'four card'
	for i in range(13):
		if n[i] == 3:
			for j in range(13):
				if n[j] == 2:
					return 'full house'
			return 'three card'
	for i in range(13):
		if n[i] == 2:
			for j in range(i + 1, 13):
				if n[j] == 2:
					return 'two pair'
			return 'one pair'
	for i in range(len(card)):
		card[i] = int(card[i])
	card.sort()
	if card == [1, 10, 11, 12, 13]:
		return 'straight'
	for i in range(4):
		if card[4 - i] - card[4 - i - 1] != 1:
			return 'null'
	return 'straight'
while True:
	try:
		card = input().split(',')
		print(hand(card))
	except:
		break


def straight(cards):
	if cards == [1, 10, 11, 12, 13]:
		return 1
	else:
		for i in range(1, 5):
			if cards[i] != cards[i - 1] + 1:
				return 0
		return 1
while True:
	try:
		cards = sorted(list(map(int, input().split(','))))
	except:
		break
	if cards.count(cards[1]) == 4:
		print('four card')
		continue
	elif len(set(cards)) == 2:
		print('full house')
		continue
	elif straight(cards) == 1:
		print('straight')
		continue
	elif cards.count(cards[2]) == 3:
		print('three card')
		continue
	elif len(set(cards)) == 3:
		print('two pair')
		continue
	elif len(set(cards)) == 4:
		print('one pair')
		continue
	else:
		print('null')
		continue


def judge(card, cnt):
	nmax = cnt[0][1]
	if nmax == 4:
		return 'four card'
	if nmax == 3:
		return 'full house' if cnt[1][1] == 2 else 'three card'
	if nmax == 2:
		return 'two pair' if cnt[1][1] == 2 else 'one pair'
	if card[0] == 1 and list(range(10, 14)) == card[1:] or list(range(card[0], card[0] + 5)) == card:
		return 'straight'
	return 'null'
import collections
while True:
	try:
		card = list(map(int, input().split(',')))
	except:
		break
	cnt = collections.Counter(card)
	print(judge(sorted(card), sorted(cnt.items(), key=lambda x: -x[1])))


while True:
	try:
		rawhand = input().split(',')
		hand = [0] * 14
		for card in rawhand:
			if card == 'A':
				hand[1] += 1
			elif card == 'J':
				hand[11] += 1
			elif card == 'Q':
				hand[12] += 1
			elif card == 'K':
				hand[13] += 1
			else:
				hand[int(card)] += 1
		pairs = 0
		three = False
		four = False
		minone = 0
		for i in range(14):
			ranks = hand[i]
			if ranks == 1 and minone == 0:
				minone = i
			elif ranks == 2:
				pairs += 1
			elif ranks == 3:
				three = True
			elif ranks == 4:
				four = True
				break
		straight = hand[minone] == 1 and hand[minone + 1] == 1 and (hand[minone + 2] == 1) and (hand[minone + 3] == 1) and (hand[minone + 4] == 1)
		straight = straight or (hand[1] == 1 and hand[10] == 1 and (hand[11] == 1) and (hand[12] == 1) and (hand[13] == 1))
		if four:
			print('four card')
		elif three and pairs == 1:
			print('full house')
		elif straight:
			print('straight')
		elif three:
			print('three card')
		elif pairs == 2:
			print('two pair')
		elif pairs == 1:
			print('one pair')
		else:
			print('null')
	except EOFError:
		break


import collections

def solution1(kard):
	if fourcard(kard):
		print('four card')
	elif fullhouse(kard):
		print('full house')
	elif straight(kard):
		print('straight')
	elif threecard(kard):
		print('three card')
	elif twopair(kard):
		print('two pair')
	elif onepair(kard):
		print('one pair')
	else:
		print('null')

def fourcard(kard):
	if kard.count(kard[0]) == 4 or kard.count(kard[1]) == 4:
		return True
	else:
		return False

def fullhouse(kard):
	list = collections.Counter(kard)
	if len(list) == 2:
		return True
	else:
		return False

def straight(kard):
	c = sorted(kard, reverse=True)
	if c[0] == c[1] + 1 == c[2] + 2 == c[3] + 3 == c[4] + 4 or (c[0] == c[1] + 1 == c[2] + 2 == c[3] + 3 and c[4] == 1 and (c[0] == 13)):
		return True
	else:
		return False

def threecard(kard):
	if kard.count(kard[0]) == 3 or kard.count(kard[1]) == 3 or kard.count(kard[2]) == 3:
		return True
	else:
		return False

def twopair(kard):
	list = collections.Counter(kard)
	if len(list) == 3:
		return True
	else:
		return False

def onepair(kard):
	list = collections.Counter(kard)
	if len(list) == 4:
		return True
	else:
		return False
while True:
	try:
		kard = list(map(int, input().split(',')))
	except:
		break
	solution1(kard)


from collections import Counter
ans = ['null', 'one pair', 'two pair', 'three card', 'straight', 'full house', 'four card']
straits = [[i, i + 1, i + 2, i + 3, i + 4] for i in range(1, 10)]
straits.append([1, 10, 11, 12, 13])
while True:
	try:
		l = sorted(list(map(int, input().split(','))))
		v = sorted(list(Counter(l).values()))
		p = 0
		if v == [1, 1, 1, 2]:
			p = 1
		elif v == [1, 2, 2]:
			p = 2
		elif v == [1, 1, 3]:
			p = 3
		elif l in straits:
			p = 4
		elif v == [2, 3]:
			p = 5
		elif v == [1, 4]:
			p = 6
		print(ans[p])
	except:
		break


def yaku(N):
	n = N[0]
	li = []
	for i in range(5):
		li.append(n)
		n += 1
	if N == li or N == [1, 10, 11, 12, 13]:
		print('straight')
		return
	mp = {}
	count_2 = 0
	count_3 = 0
	for i in N:
		if i in mp:
			mp[i] += 1
		else:
			mp[i] = 1
	co = 0
	for (k, v) in mp.items():
		if v != 1:
			if v == 2:
				count_2 += 1
			elif v == 3:
				count_3 += 1
			else:
				print('four card')
				return
		else:
			co += 1
			if co == 5:
				print('null')
				return
	if count_2 == 1 and count_3 == 1:
		print('full house')
	elif count_3 == 1:
		print('three card')
	elif count_2 == 2:
		print('two pair')
	elif count_2 == 1:
		print('one pair')
while True:
	try:
		N = sorted(list(map(int, input().split(','))))
		yaku(N)
	except:
		break


import collections

def judge(card, cnt):
	nmax = cnt[0][1]
	if nmax == 4:
		return 'four card'
	if nmax == 3:
		return 'full house' if cnt[1][1] == 2 else 'three card'
	if nmax == 2:
		return 'two pair' if cnt[1][1] == 2 else 'one pair'
	if card[0] == 1 and list(range(10, 14)) == card[1:] or list(range(card[0], card[0] + 5)) == card:
		return 'straight'
	return 'null'
while True:
	try:
		card = list(map(int, input().split(',')))
	except:
		break
	cnt = collections.Counter(card)
	print(judge(sorted(card), sorted(cnt.items(), key=lambda x: -x[1])))


def get_input():
	while True:
		try:
			yield ''.join(input())
		except EOFError:
			break
N = list(get_input())
for l in range(len(N)):
	table = [0 for i in range(15)]
	cards = [int(i) for i in N[l].split(',')]
	for i in range(5):
		table[cards[i]] += 1
	(two, three, four, ren) = (0, 0, 0, 0)
	for i in range(15):
		if table[i] == 2:
			two += 1
		elif table[i] == 3:
			three += 1
		elif table[i] == 4:
			four += 1
	for i in range(14):
		if table[i] == 1 and table[i + 1] == 1:
			ren += 1
	if table[10] == 1 and table[11] == 1 and (table[12] == 1) and (table[13] == 1) and (table[1] == 1):
		ren = 4
	ans = 'null'
	if four == 1:
		ans = 'four card'
	elif two == 1 and three == 1:
		ans = 'full house'
	elif ren == 4:
		ans = 'straight'
	elif three == 1:
		ans = 'three card'
	elif two == 2:
		ans = 'two pair'
	elif two == 1:
		ans = 'one pair'
	print(ans)


import sys

def check(cards):
	(ones, twos, threes, fours) = (0, 0, 0, 0)
	for i in range(1, 14):
		c = cards.count(i)
		if c == 1:
			ones += 1
		elif c == 2:
			twos += 1
		elif c == 3:
			threes += 1
		elif c == 4:
			fours += 1
	if fours:
		return 'four card'
	if threes and twos:
		return 'full house'
	if ones == 5:
		for (i, v) in enumerate(cards[:-1]):
			if not v == cards[i + 1] - 1:
				break
		else:
			return 'straight'
		if cards == [1, 10, 11, 12, 13]:
			return 'straight'
	if threes:
		return 'three card'
	if twos == 2:
		return 'two pair'
	if twos:
		return 'one pair'
	return 'null'

def solve():
	for line in sys.stdin:
		cards = sorted(map(int, line.split(',')))
		print(check(cards))
solve()


import sys, math, os
PYDEV = os.environ.get('PYDEV')
if PYDEV == 'True':
	sys.stdin = open('sample-input.txt', 'rt')

def is_straight(hand):
	if hand == [1, 10, 11, 12, 13]:
		return True
	m = min(hand)
	if hand == list(range(m, m + 5)):
		return True
	return False

def poker_hand(hand):
	hand = sorted(hand)
	counts = {}
	for card in hand:
		counts[card] = counts.get(card, 0) + 1
	counts = sorted(list(counts.values()))
	if counts == [1, 4]:
		return 'four card'
	elif counts == [2, 3]:
		return 'full house'
	elif is_straight(hand):
		return 'straight'
	elif counts == [1, 1, 3]:
		return 'three card'
	elif counts == [1, 2, 2]:
		return 'two pair'
	elif counts == [1, 1, 1, 2]:
		return 'one pair'
	else:
		return 'null'
while True:
	try:
		hand = [int(_) for _ in input().split(',')]
	except EOFError:
		break
	print(poker_hand(hand))


import sys
readlines = sys.stdin.readlines
write = sys.stdout.write

def solve(C):
	d = {}
	for c in C:
		d[c] = d.get(c, 0) + 1
	(*vs,) = d.values()
	vs.sort()
	if vs[-1] == 4:
		return 'four card'
	if vs == [2, 3]:
		return 'full house'
	c0 = C[0]
	if C == list(range(c0, c0 + 5)) or C == [1, 10, 11, 12, 13]:
		return 'straight'
	if vs == [1, 1, 3]:
		return 'three card'
	if vs == [1, 2, 2]:
		return 'two pair'
	if vs == [1, 1, 1, 2]:
		return 'one pair'
	return 'null'
for line in readlines():
	(*C,) = map(int, line.split(','))
	C.sort()
	write('%s\n' % solve(C))


while 1:
	try:
		hand = list(map(int, input().split(',')))
		hand.sort()
		if len(list(set(hand))) == 2:
			if hand.count(hand[0]) == 4 or hand.count(hand[4]) == 4:
				print('four card')
			else:
				print('full house')
		elif hand[0] + 1 == hand[1] and hand[1] + 1 == hand[2] and (hand[2] + 1 == hand[3]) and (hand[3] + 1 == hand[4]):
			print('straight')
		elif hand[0] == 1 and hand[1] == 10 and (hand[2] == 11) and (hand[3] == 12) and (hand[4] == 13):
			print('straight')
		elif len(list(set(hand))) == 3:
			if hand.count(hand[0]) == 3 or hand.count(hand[2]) == 3 or hand.count(hand[4]) == 3:
				print('three card')
			else:
				print('two pair')
		elif len(list(set(hand))) == 4:
			print('one pair')
		else:
			print('null')
	except:
		break


from collections import Counter

def put_ans(cards):
	cards.sort()
	if cards == [1, 10, 11, 12, 13]:
		print('straight')
		return
	for i in range(1, len(cards)):
		if cards[i] - cards[i - 1] != 1:
			break
	else:
		print('straight')
		return
	result = [t[1] for t in Counter(cards).most_common()]
	if result == [1, 1, 1, 1, 1]:
		print('null')
	if result == [2, 1, 1, 1]:
		print('one pair')
	if result == [2, 2, 1]:
		print('two pair')
	if result == [3, 1, 1]:
		print('three card')
	if result == [3, 2]:
		print('full house')
	if result == [4, 1]:
		print('four card')

def main():
	while True:
		try:
			cards = list(map(int, input().split(',')))
			put_ans(cards)
		except EOFError:
			break
main()


import sys
import math

class mymath:
	pi = 3.141592653589793

	def pnum_eratosthenes(self, n):
		ptable = [0 for i in range(n + 1)]
		plist = []
		for i in range(2, n + 1):
			if ptable[i] == 0:
				plist.append(i)
				for j in range(i + i, n + 1, i):
					ptable[j] = 1
		return plist

	def pnum_check(self, n):
		if n == 1:
			return False
		elif n == 2:
			return True
		else:
			for x in range(2, n):
				if n % x == 0:
					return False
			return True

	def gcd(self, a, b):
		if b == 0:
			return a
		return self.gcd(b, a % b)

	def lcm(self, a, b):
		return a * b // self.gcd(a, b)

	def mul(self, A, B):
		ans = []
		for a in A:
			c = 0
			for (j, row) in enumerate(a):
				c += row * B[j]
			ans.append(c)
		return ans

	def is_integer(self, n):
		try:
			float(n)
		except ValueError:
			return False
		else:
			return float(n).is_integer()

	def dist(self, A, B):
		d = 0
		for i in range(len(A)):
			d += (A[i] - B[i]) ** 2
		d = d ** (1 / 2)
		return d

	def abs(self, n):
		if n >= 0:
			return n
		else:
			return -n
mymath = mymath()

class output:

	def list(self, l):
		l = list(l)
		for (i, num) in enumerate(l):
			print(num, end='')
			if i != len(l) - 1:
				print(' ', end='')
		print()
output = output()

def printA(A):
	N = len(A)
	for (i, n) in enumerate(A):
		print(n, end='')
		if i != N - 1:
			print(' ', end='')
	print()

def get_input():
	N = []
	while True:
		try:
			N.append([int(x) for x in input().split(',')])
		except EOFError:
			break
	return N
D = get_input()
for d in D:
	ans = 'null'
	L = [0 for x in range(13)]
	for i in d:
		L[i - 1] += 1
	if 4 in L:
		ans = 'four card'
	elif 3 in L:
		if 2 in L:
			ans = 'full house'
		else:
			ans = 'three card'
	elif 2 in L:
		if L.count(2) == 2:
			ans = 'two pair'
		else:
			ans = 'one pair'
	else:
		d.sort()
		d = [x - min(d) for x in d]
		if d == [0, 1, 2, 3, 4]:
			ans = 'straight'
		elif d == [0, 9, 10, 11, 12]:
			ans = 'straight'
	print(ans)


while 1:
	try:
		a = [int(i) for i in input().split(',')]
		a.sort()
		pairs = []
		for i in set(a):
			count = 0
			for j in a:
				if j == i:
					count += 1
			pairs.append(count)
		if 5 in pairs:
			print('full house')
		elif 4 in pairs:
			print('four card')
		elif 3 in pairs and 2 in pairs:
			print('full house')
		elif 3 in pairs:
			print('three card')
		elif pairs.count(2) == 2:
			print('two pair')
		elif 2 in pairs:
			print('one pair')
		elif [a[i + 1] - a[i] for i in range(4)] == [1 for i in range(4)] or a == [1, 10, 11, 12, 13]:
			print('straight')
		else:
			print('null')
	except EOFError:
		break


while 1:
	try:
		n = sorted(map(int, input().split(',')))
	except:
		break
	c = sum((n.count(x) for x in n))
	if c == 17:
		c = 3
	elif c in [13, 11, 9, 7]:
		c -= 5
	elif max(n) - min(n) == 4 or (n[1] == 10 and n[0] == 1):
		c = 1
	else:
		c = 0
	print(['null', 'straight', 'one pair', 'four card', 'two pair', '', 'three card', '', 'full house'][c])


import sys
for line in sys.stdin.readlines():
	l = [int(i) for i in line.split(',')]
	l.sort()
	n = sum([l.count(i) for i in l])
	if n == 17:
		print('four card')
	elif n == 13:
		print('full house')
	elif n == 11:
		print('three card')
	elif n == 9:
		print('two pair')
	elif n == 7:
		print('one pair')
	elif max(l) - min(l) == 4 or (l[1] == 10 and l[0] == 1):
		print('straight')
	else:
		print('null')


import sys
for e in sys.stdin:
	e = sorted(map(int, e.split(',')))
	print([['null', 'straight'][e[4] - e[0] == 4 or e[0] * 10 == e[1]], 'one pair', 'two pair', 'three card', 'full house', 0, 'four card'][sum((e.count(s) for s in e)) // 2 - 2])