fun main(args: Array<String>) {
    readLine()
    val a = mutableListOf(0).apply {
        addAll(readLine()
                ?.split(" ")
                ?.map { it.toInt() }!!)
        add(0)
    }
    val _a = a

    val list = _a.mapIndexed { i, v ->
        if (i == 0) 0 else (a[i - 1] abs v)
    }

    val sum = list.sum() + (a[a.lastIndex] abs 0)

    (1 until a.size - 1).forEach {
        println(sum - list[it] - list[it + 1] + (a[it - 1] abs a[it + 1]))
    }
}

infix fun Int.abs(x: Int) = if ((this - x) < 0) (this - x) * (-1) else (this - x)
