#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,n) for(ll (i)=0; i<(n); ++(i))
#define print(a) cout << (a) << endl

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  ll n;cin>>n;
  ll tmp=0,i=1,diff;
  while(tmp<n) {tmp+=i;i+=1;}
  diff=tmp-n;
  for(ll j=1;j<i;++j) if(j!=diff) print(j);
  return 0;
}