The problem set at _CODE FESTIVAL 20XX Finals_ consists of N problems.  The score allocated to the i-th (1≦i≦N) problem is i points.  Takahashi, a contestant, is trying to score exactly N points. For that, he is deciding which problems to solve.  As problems with higher scores are harder, he wants to minimize the highest score of a problem among the ones solved by him.  Determine the set of problems that should be solved.
n=int(input())
def solve(m):
    big=m[0]
    ok=0
    for i in range(big-1,-1,-1):
        if i not in m and big-i not in m:
            m.pop(0)
            m.append(i)
            m.append(big-i)
            ok+=1
            break
    if ok>0:
        m.sort(reverse=True)
        return solve(m)
    else:
        return(m)
ans=solve([n])
for i in ans:
    print(i)
n=int(input())
t=1
while n>t:
    n-=t
    t+=1
rem=t-n
las=t
for i in range(1,las+1):
    if i!=rem:
        print(i)