from itertools import accumulate

n=int(eval(input()))

l=list(accumulate(list(range(4473))))



while True:

    for i,x in enumerate(l):

        if n==x:

            for y in range(1,i+1):

                print(y)

            exit()

        elif n<x:

            print(i)

            n-=i

            break
from itertools import accumulate

import bisect

n=int(eval(input()))

l=list(accumulate(list(range(4473))))

while True:

    i=bisect.bisect_left(l,n)

    if i<1:break

    print(i)

    n-=i
from itertools import accumulate

n = int(eval(input()))
l = list(accumulate(list(range(4473))))
while True:
    for i, x in enumerate(l):
        if n == x:
            for y in range(1, i + 1):
                print(y)
            exit()
        elif n < x:
            print(i)
            n -= i
            break

from itertools import accumulate
import bisect

n = int(eval(input()))
l = list(accumulate(list(range(4473))))
while True:
    i = bisect.bisect_left(l, n)
    if i < 1:
        break
    print(i)
    n -= i

+import bisect -    for i, x in enumerate(l): -        if n == x: -            for y in range(1, i + 1): -                print(y) -            exit() -        elif n < x: -            print(i) -            n -= i -            break +    i = bisect.bisect_left(l, n) +    if i < 1: +        break +    print(i) +    n -= i