N = int(eval(input()))

r=int((2*N+.25)**0.5 - 0.5)+1

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

  if i!=r*(r+1)//2-N:

    print(i)
N=int(input())

r=int((2*N+.25)**0.5 + 0.5)

l=r*(r+1)//2-N

[print(i) for i in list(range(1,r+1)) if i!=l]

N = int(eval(input()))
r = int((2 * N + 0.25) ** 0.5 - 0.5) + 1
for i in range(1, r + 1):
    if i != r * (r + 1) // 2 - N:
        print(i)

N = int(input())
r = int((2 * N + 0.25) ** 0.5 + 0.5)
l = r * (r + 1) // 2 - N
[print(i) for i in list(range(1, r + 1)) if i != l]

-N = int(eval(input())) -r = int((2 * N + 0.25) ** 0.5 - 0.5) + 1 -for i in range(1, r + 1): -    if i != r * (r + 1) // 2 - N: -        print(i) +N = int(input()) +r = int((2 * N + 0.25) ** 0.5 + 0.5) +l = r * (r + 1) // 2 - N +[print(i) for i in list(range(1, r + 1)) if i != l]