fun main(args : Array<String>) {
    val n = readLine()!!.toInt()
    val aa = readLine()!!.split(" ").map { it.toInt() }.toMutableList()
    aa.add(0)

    val fees = aa.mapIndexed { idx, a ->
        if (idx == 0) {
            Math.abs(a)
        } else if (idx == n) {
            Math.abs(aa[n-1])
        } else {
            Math.abs(a-aa[idx-1])
        }
    }

    val feesSum = fees.sum()

    val ans = mutableListOf<Int>()
    for (i in 0 until n) {
        var tmp = feesSum - fees[i] - fees[i+1]
        if (i == 0) {
            tmp += Math.abs(aa[i+1])
        } else {
            tmp += Math.abs(aa[i+1]-aa[i-1])
        }
        ans.add(tmp)
    }

    println(ans.joinToString(separator = System.lineSeparator()))
}