output_description: Among the sets of problems with the total score of N, find a set in which the
  highest score of a problem is minimum, then print the indices of the problems
  in the set in any order, one per line.
  
  If there exists more than one such set, any of them will be accepted.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N
attempt: cv  # -*- coding: utf-8 -*-
  import sys
  import math
  import os
  import itertools
  import string
  import heapq
  import _collections
  from collections import Counter
  from collections import defaultdict
  from functools import lru_cache
  import bisect
  import re
  import queue
  
  
  class Scanner:
      @staticmethod
      def int():
          return int(sys.stdin.readline().rstrip())
  
      @staticmethod
      def string():
          return sys.stdin.readline().rstrip()
  
      @staticmethod
      def map_int():
          return [int(x) for x in Scanner.string().split()]
  
      @staticmethod
      def string_list(n):
          return [input() for i in range(n)]
  
      @staticmethod
      def int_list_list(n):
          return [Scanner.map_int() for i in range(n)]
  
      @staticmethod
      def int_cols_list(n):
          return [int(input()) for i in range(n)]
  
  
  class Math:
      @staticmethod
      def gcd(a, b):
          if b == 0:
              return a
          return Math.gcd(b, a % b)
  
      @staticmethod
      def lcm(a, b):
          return (a * b) // Math.gcd(a, b)
  
      @staticmethod
      def divisor(n):
          res = []
          i = 1
          for i in range(1, int(n**0.5) + 1):
              if n % i == 0:
                  res.append(i)
                  if i != n // i:
                      res.append(n // i)
          return res
  
      @staticmethod
      def round_up(a, b):
          return -(-a // b)
  
      @staticmethod
      def is_prime(n):
          if n < 2:
              return False
          if n == 2:
              return True
          if n % 2 == 0:
              return False
          d = int(n**0.5) + 1
          for i in range(3, d + 1, 2):
              if n % i == 0:
                  return False
          return True
  
  
  class PriorityQueue:
      def __init__(self, l=[]):
          self.q = l
          heapq.heapify(self.q)
          return
  
      def push(self, n):
          heapq.heappush(self.q, n)
          return
  
      def pop(self):
          return heapq.heappop(self.q)
  
  
  MOD = int(1e09) + 7
  INF = int(1e15)
  
  
  def factorization(n):
      S = {}
      temp = n
      for i in range(2, int(-(-(n**0.5) // 1)) + 1):
          if temp % i == 0:
              cnt = 0
              while temp % i == 0:
                  cnt += 1
                  temp //= i
              S[i] = cnt
  
      if temp != 1:
          S[temp] = 1
  
      if S == []:
          S[n] = 1
  
      return S
  
  
  def main():
      # sys.stdin = open("sample.txt")
      N = Scanner.int()
      ok = N + 1
      ng = 0
      while abs(ok - ng) > 1:
          m = (ok + ng) // 2
          if m * (m + 1) // 2 >= N:
              ok = m
          else:
              ng = m
      for i in reversed(range(1, ok + 1)):
          if N >= i:
              print(i)
              N -= i
  
  
  if __name__ == "__main__":
      main()
  
problem_description: Statement
  
  The problem set at _CODE FESTIVAL 20XX Finals_ consists of N problems.
  
  The score allocated to the i-th (1≦i≦N) problem is i points.
  
  Takahashi, a contestant, is trying to score exactly N points. For that, he is
  deciding which problems to solve.
  
  As problems with higher scores are harder, he wants to minimize the highest
  score of a problem among the ones solved by him.
  
  Determine the set of problems that should be solved.
samples: [{"input": "4", "output": "1\n    3\n    \n\nSolving only the 4-th problem will also result in the total score of 4 points,\nbut solving the 1-st and 3-rd problems will lower the highest score of a\nsolved problem.\n\n* * *"}, {"input": "7", "output": "1\n    2\n    4\n    \n\nThe set \\\\{3,4\\\\} will also be accepted.\n\n* * *"}, {"input": "1", "output": "1"}]