#include <iostream>
#include <cmath>

using namespace std;

int main() {
  int N;
  cin >> N;
  int s = (sqrt(1+8*N)-1)/2 + 1;
  int r = s*(s+1)/2 - N;
  for (int i = 1; i <= s; ++i) {
    if (i == r) continue;
    cout << i << endl;
  }
}
