#include <iostream>

using namespace std;

int main()
{
	int n;
	cin >> n;
	int sum = 1;
	int i = 2;
	while (sum < n) {
		sum += i;
		i++;
	}

	int diff = sum - n;
	for (int j = 1; j < i; j++) {
		if (j == diff) {
			continue;
		}
		cout << j << endl;
	}

	return 0;
}