import java.io.BufferedReader
import java.io.InputStreamReader
import java.io.PrintWriter
import java.io.StreamTokenizer

fun main(args: Array<String> ) {
    val st = StreamTokenizer( BufferedReader( InputStreamReader( System.`in` ) ) )
    val n = st.nextInt()
    val a = IntArray( n + 2, { if ( it == 0 || it == n + 1 ) 0 else st.nextInt() } )
    var l = 0L
    for ( i in a.indices.take( n + 1 ) ) {
        l += Math.abs( a[i] - a[i + 1] )
    }
    val out = PrintWriter( System.out )
    for ( i in 1 .. n ) {
        out.println( l - Math.abs( a[i] - a[i - 1] ) - Math.abs( a[i] - a[i + 1] ) + Math.abs( a[i - 1] - a[i + 1] ) )
    }
    out.close()
}

private fun StreamTokenizer.nextInt(): Int {
    nextToken()
    return nval.toInt()
}
