fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val temp=readLine()!!.split(" ")
    val a=IntArray(n,{i: Int -> temp[i].toInt()})
    val b=IntArray(n-1,{i: Int -> abs(a[i]-a[i+1])})
    val len=abs(a[0])+b.sum()+abs(a[n-1])
    println(len-abs(a[0])-b[0]+abs(a[1]))
    for (i in 1 until n-1){
        println(len-b[i-1]-b[i]+abs(a[i+1]-a[i-1]))
    }
    println(len-abs(a[n-1])-b[n-2]+abs(a[n-2]))
}
fun  abs(i:Int):Int{
    if (i<0)return -i
    return i
}