import Data.List
import Control.Arrow

main = readLn >>= mapM_ print . enp

enp n = delete (d-n) [1 .. i]
  where
   as = scanl1 (+) [1..n]
   d = head (dropWhile (<n) as)
   i = maybe undefined succ (elemIndex d as)