inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
N = inp.shift() * 1
a = 0
i = 0
while(a < N) {
    i++
    a += i
}
m = a - N
for(j=1; j<=i; j++) {
    if (m != j) {
      console.log(j)
    }
}