from itertools import accumulate

from math import sqrt, ceil

from bisect import bisect_left



N = int(eval(input()))

n = list(accumulate(list(range(ceil(sqrt(2 * N)) + 1))))



r = bisect_left(n, N)



if n[r] == N:

    print(('\n'.join(map(str, list(range(1, r + 1))))))

    exit()



d = n[r] - N

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

    if i != d:

        print(i)
from itertools import accumulate

from math import sqrt, ceil

from bisect import bisect_left



N = int(eval(input()))

n = list(accumulate(list(range(ceil(sqrt(2 * N)) + 1))))



r = bisect_left(n, N)

answer = list(map(str, list(range(1, r + 1))))



if n[r] != N:

    d = n[r] - N

    answer.remove(str(d))



print(('\n'.join(answer)))
from itertools import accumulate
from math import sqrt, ceil
from bisect import bisect_left

N = int(eval(input()))
n = list(accumulate(list(range(ceil(sqrt(2 * N)) + 1))))
r = bisect_left(n, N)
if n[r] == N:
    print(("\n".join(map(str, list(range(1, r + 1))))))
    exit()
d = n[r] - N
for i in range(1, r + 1):
    if i != d:
        print(i)

from itertools import accumulate
from math import sqrt, ceil
from bisect import bisect_left

N = int(eval(input()))
n = list(accumulate(list(range(ceil(sqrt(2 * N)) + 1))))
r = bisect_left(n, N)
answer = list(map(str, list(range(1, r + 1))))
if n[r] != N:
    d = n[r] - N
    answer.remove(str(d))
print(("\n".join(answer)))

-if n[r] == N: -    print(("\n".join(map(str, list(range(1, r + 1)))))) -    exit() -d = n[r] - N -for i in range(1, r + 1): -    if i != d: -        print(i) +answer = list(map(str, list(range(1, r + 1)))) +if n[r] != N: +    d = n[r] - N +    answer.remove(str(d)) +print(("\n".join(answer)))