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

int main() {
    int n;
    cin >> n;
    
    int p = 0;
    vector<int> ans;
    for (int i = 1; i <= n; i++) {
        p += i;
        ans.emplace_back(i);
        if (n < p) break;
    }
    
    for (const auto &e : ans) {
        if (e != p - n) cout << e << '\n';
    }
    
    return 0;
}