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

int main() {
    int N;
    cin >> N;
    int ans, p;
    for (int i = 1; i <= N; i++) {
        ans = i * (1 + i) / 2;
        if (ans >= N) {
            p = i;
            break;
        }
    }
    for (int i = 1; i <= p; i++) {
        if (i == ans - N) continue;
        cout << i << endl;
    }
}