import java.io.FileInputStream
import java.util.*


var sc: Scanner = Scanner(System.`in`)
fun main(args: Array<String>) {
    if (args.size > 0) {
        System.setIn(FileInputStream(args[0]))
    }
    sc = Scanner(System.`in`)

    problem()

}

fun problem() {

    val N = sc.nextInt()
    val list = mutableListOf<Int>();
    list.add(0)
    for (i in 1..N) {
        val Ai = sc.nextInt()
        list.add(Ai)
    }
    list.add(0)
    var now = 0
    val diff = mutableListOf<Int>()
    for (i in 1..(N + 1)) {
        val a = list[i]
        diff.add(Math.abs(now - a))
        now = a
    }
    var sum = diff.sum()

    for (i in 1..N) {
        val a = list[i - 1]
        val b = list[i]
        val c = list[i + 1]

        val d = Math.abs(a - b) + Math.abs(b - c) - Math.abs(a - c)
        println(sum - d)
    }


    //println(brues)
    //println(sum)

}

