n = int(input())





def calc(n):

    mx = 1

    while True:

        if n <= mx * (mx + 1) // 2:

            break

        mx += 1

    return mx





ans = []

while n > 0:

    x = calc(n)

    ans.append(x)

    n -= x



print(*ans, sep="\n")

N = int(input())

x = 1

for _ in range(100000):

    if (x + 2) * (x + 1) // 2 > N:

        break

    x += 1



H = [i for i in range(x, 0, -1)]

dif = N - sum(H)



for i in range(dif):

    H[(i) % len(H)] += 1



print(*sorted(H), sep="\n")

n = int(input())


def calc(n):
    mx = 1
    while True:
        if n <= mx * (mx + 1) // 2:
            break
        mx += 1
    return mx


ans = []
while n > 0:
    x = calc(n)
    ans.append(x)
    n -= x
print(*ans, sep="\n")

N = int(input())
x = 1
for _ in range(100000):
    if (x + 2) * (x + 1) // 2 > N:
        break
    x += 1
H = [i for i in range(x, 0, -1)]
dif = N - sum(H)
for i in range(dif):
    H[(i) % len(H)] += 1
print(*sorted(H), sep="\n")

-n = int(input()) - - -def calc(n): -    mx = 1 -    while True: -        if n <= mx * (mx + 1) // 2: -            break -        mx += 1 -    return mx - - -ans = [] -while n > 0: -    x = calc(n) -    ans.append(x) -    n -= x -print(*ans, sep="\n") +N = int(input()) +x = 1 +for _ in range(100000): +    if (x + 2) * (x + 1) // 2 > N: +        break +    x += 1 +H = [i for i in range(x, 0, -1)] +dif = N - sum(H) +for i in range(dif): +    H[(i) % len(H)] += 1 +print(*sorted(H), sep="\n")