N = int(eval(input()))

k = 1

while (k*(k+1))//2<N:

    k += 1

A = [i for i in range(1,k+1)]

if N==(k*(k+1))//2:

    for a in A:

        print(a)

else:

    m = (k*(k+1))//2-N

    for a in A:

        if a!=m:

            print(a)
N = int(eval(input()))

A = []

while N>0:

    k = 0

    cnt = 0

    while cnt<N:

        k += 1

        cnt += k

    A.append(k)

    N -= k

for a in A:

    print(a)
N = int(eval(input()))
k = 1
while (k * (k + 1)) // 2 < N:
    k += 1
A = [i for i in range(1, k + 1)]
if N == (k * (k + 1)) // 2:
    for a in A:
        print(a)
else:
    m = (k * (k + 1)) // 2 - N
    for a in A:
        if a != m:
            print(a)

N = int(eval(input()))
A = []
while N > 0:
    k = 0
    cnt = 0
    while cnt < N:
        k += 1
        cnt += k
    A.append(k)
    N -= k
for a in A:
    print(a)

-k = 1 -while (k * (k + 1)) // 2 < N: -    k += 1 -A = [i for i in range(1, k + 1)] -if N == (k * (k + 1)) // 2: -    for a in A: -        print(a) -else: -    m = (k * (k + 1)) // 2 - N -    for a in A: -        if a != m: -            print(a) +A = [] +while N > 0: +    k = 0 +    cnt = 0 +    while cnt < N: +        k += 1 +        cnt += k +    A.append(k) +    N -= k +for a in A: +    print(a)