{-# LANGUAGE BangPatterns, MultiWayIf #-}

import Control.Applicative
import Control.Monad
import Data.List
import Debug.Trace (traceShow)
import qualified Data.ByteString.Char8 as B
readi b | Just (n, _) <- B.readInt b = n

f :: Int -> Int
f n = n * (n + 1) `div` 2

main :: IO ()
main = do
    n <- readLn :: IO Int
    let a = head $ dropWhile ((< n) . f) [1 .. n]
    let d = f a - n
    forM_ [1 .. a] $ \i -> do
        when (i /= d) $ do
            print i