import Control.Monad
import Control.Applicative
import Data.Functor
import Data.Monoid
import Data.Maybe
import Data.List
import Data.Foldable (foldMap)
import Data.List.Split
import Data.Char
import Data.Ratio
import Data.Ord
import Data.Array.IO

readInt = read :: String -> Int
getInt = readLn :: IO Int
getInts = map readInt . words <$> getLine
sjoin :: (Show a) => [a] -> String
sjoin = unwords . map show
cond :: a -> a -> Bool -> a
cond t f c = if c then t else f
-- end of templete

score hand
  | elem 4 counts = "four card"
  | counts == [2,3] = "full house"
  | hand == [1,10,11,12,13] || map (subtract $ head hand) (tail hand) == [1,2,3,4] = "straight"
  | elem 3 counts = "three card"
  | counts == [1,2,2] = "two pair"
  | elem 2 counts = "one pair"
  | otherwise = "null"
  where counts = sort . map length . group $ hand

main = do
    ls <- map (sort . map readInt . wordsBy (==',')) . lines <$> getContents
    forM_ ls $ putStrLn . score