import java.lang.StringBuilder

fun main(arr:Array<String>) {
    val pointCount = readLine()!!.toInt()
    val points = readLine()!!.split(" ").map { it.toInt() }
    val move = points.indices.map { 0L }.toMutableList()
    move[0] = Math.abs(points[0]).toLong()
    for(i in (1 until pointCount)) {
        move[i] = move[i-1] + Math.abs(points[i-1] - points[i])
    }
    val ans = StringBuilder()
    (0 until pointCount).forEach {
        if(it == 0) {
            ans.appendln(move.last() - move[1] + Math.abs(points[1]) + Math.abs(points.last()) )
        } else if(it == pointCount - 1) {
            ans.appendln(move[move.lastIndex - 1] + Math.abs(points[points.lastIndex - 1]))
        } else {
            ans.appendln(move[it-1] + move.last() - move[it+1] + Math.abs(points[it-1] - points[it+1]) + Math.abs(points.last()))
        }
    }
    print(ans.toString())
}
