import Control.Monad
import Control.Applicative
import Data.List
import Data.List.Split

main = do
  xs <- input (map read . splitOn ",") :: IO [[Int]]
  mapM_ putStrLn $ solve xs

solve :: [[Int]] -> [String]
solve = map poker

poker :: [Int] -> String
poker xs
  | cs == [1,4] = "four card"
  | sxs == [1,10,11,12,13] = "straight"
  | and (map (== (head axs)) axs) = "straight"
  | cs == [2,3] = "full house"
  | cs == [1,1,3] = "three card"
  | cs == [1,2,2] = "two pair"
  | cs == [1,1,1,2] = "one pair"
  | otherwise = "null"
  where
    cs = (sort . map length . group . sort) xs
    sxs = sort xs
    axs = zipWith (+) sxs (reverse sxs)

input :: (String -> a) -> IO [a]
input f = map f . lines <$> getContents 