import System.Environment (getArgs)


pascal :: [[Integer]]
pascal = [1]: map (\row -> 1: zipWith (+) row (tail row) ++ [1]) pascal




catalan :: [Integer]
catalan = map (diff . uncurry drop) $ zip [0..] (alt pascal)
  where alt (x:_:zs) = x: alt zs 
        diff (x:y:_) = x - y
        diff (x:_)   = x

main :: IO ()
main = do
  ns <- fmap (map read) getArgs :: IO [Int]
  mapM_ (print . flip take catalan) ns