import java.math.*

fun main(args: Array<String>) {
    val n = Integer.parseInt(readInputLine())
    val aList = readInputLine().split(" ").map { Integer.parseInt(it) }.toMutableList<Int>()
    aList.add(0, 0)
    aList.add(0)

    var totalCost = 0L
    for (i in 1 until aList.size) {
        totalCost += Math.abs(aList[i - 1] - aList[i])
    }

    for (i in 1..n) {
        println("""${totalCost 
                     - Math.abs(aList[i - 1] - aList[i]) 
                     - Math.abs(aList[i] - aList[i + 1])
                     + Math.abs(aList[i - 1] - aList[i + 1])}""")
    }
    
}
 
fun readInputLine(): String {
    return readLine()!!
}
