#include<bits/stdc++.h>
using namespace std;

int main(){
  int n;
  cin >> n;
  int cnt = 0;
  int i = 1;
  while(cnt < n){
    cnt += i;
    i++;
  }
  int p = cnt - n;
  for(int j = 0; j < i-1; j++){
    if(j + 1 != p) cout << j + 1 << endl;
  }
}