n = int(eval(input()))

a = []

b = 0

i = 1

while b < n:

    a.append(i)

    b += i

    i += 1

b -= n

for i in a:

    if i != b:

        print(i)
n = int(eval(input()))

ans = []

a = 0

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

    a += i

    ans.append(i)

    if a >= n:

        break

a -= n

for x in ans:

    if x != a:

        print(x)
n = int(eval(input()))
a = []
b = 0
i = 1
while b < n:
    a.append(i)
    b += i
    i += 1
b -= n
for i in a:
    if i != b:
        print(i)

n = int(eval(input()))
ans = []
a = 0
for i in range(1, n + 1):
    a += i
    ans.append(i)
    if a >= n:
        break
a -= n
for x in ans:
    if x != a:
        print(x)

-a = [] -b = 0 -i = 1 -while b < n: -    a.append(i) -    b += i -    i += 1 -b -= n -for i in a: -    if i != b: -        print(i) +ans = [] +a = 0 +for i in range(1, n + 1): +    a += i +    ans.append(i) +    if a >= n: +        break +a -= n +for x in ans: +    if x != a: +        print(x)