import java.util.*
import kotlin.math.acos
import kotlin.math.cos
import kotlin.math.round
import kotlin.math.sin

fun main() {
    val n = readInt()

    var sum = 0
    for (i in 1..n) {
        sum += i
        if (sum < n) continue

        val diff = sum - n
        val ans = StringBuilder()
        for (j in 1..i) {
            if (j == diff) continue
            ans.append("$j\n")
        }
        print(ans.toString())
        return
    }
}

fun readString() = readLine()!!
fun readInt() = readLine()!!.toInt()