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

    aa.add(0, 0)
    aa.add(0)

    val s = (0..n).map { Math.abs(aa[it] - aa[it + 1]) }.sum()

    for (i in 1..n) {
        val x = Math.abs(aa[i - 1] - aa[i]) + Math.abs(aa[i] - aa[i + 1])
        val y = Math.abs(aa[i - 1] - aa[i + 1])
        val ans = s - x + y
        println(ans)
    }
}