import qualified Data.IntMap as M

main = readLn >>= mapM_ print . enp

enp n = dp n (M.singleton 0 []) [1..]

dp n m (p:ps)
  | M.member n m1 = m1 M.! n
  | otherwise = dp n m1 ps
  where
    m1 = M.union m $ M.filterWithKey (\k _ -> k<=n) $ M.mapKeysMonotonic (+p) $ M.map (p:) m 