fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val a = listOf(0)
        .plus(readLine()!!.split(' ').map { it.toInt() })
        .plus(0)
    val sum = (0 until a.size - 1).map { Math.abs(a[it] - a[it + 1]) }.sum()
    for (i in 1..n) {
        val left = Math.abs(a[i] - a[i - 1])
        val right = Math.abs(a[i] - a[i + 1])
        val jump = Math.abs(a[i - 1] - a[i + 1])
        println(sum - left - right + jump)
    }
}