import Data.List
main = interact $ unlines . map (poker_hand . sort . map (read::String->Int) . splitOn ',') . lines
 
splitOn c xs
 | null xs = []
 | head xs == c = splitOn c (tail xs)
 | otherwise = (takeWhile (/= c)) xs : splitOn c (dropWhile (/= c) xs)

poker_hand xs
 | (maximum . map length . group) xs == 4 = "four card"
 | (sort . map length . group) xs == [2,3] = "full house"
 | xs == [(head xs)..(head xs + 4)] || xs == [1,10,11,12,13] = "straight"
 | (maximum . map length . group) xs == 3 = "three card"
 | (length . group) xs == 3 = "two pair"
 | (length . group) xs == 4 = "one pair"
 | otherwise = "null"