fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val a = listOf(0) + readLine()!!.split(" ").map { it.toInt() } + listOf(0)
    var total = 0
    for (i in 0 until n+1) total += Math.abs(a[i+1]-a[i])
    for (i in 1 until n+1) {
        var dif = Math.abs(a[i]-a[i-1]) + Math.abs(a[i+1]-a[i]) - Math.abs(a[i+1]-a[i-1])
        println(total-dif)
    }
}