# include <bits/stdc++.h>
# define INF 1e9
using namespace std;

int main(){

  int N;
  cin >> N;
  for(int i=1; i<N+1; i++){
    int v = i*(i+1) / 2;
    if(v >= N){
      for(int j=1; j<i+1; j++){
        if(j != v-N) cout << j << endl;
      }
      exit(0);
    }
  }

}