fun main(args:Array<String>) {
	val n = readLine()!!.toInt()
	val a = "0 ${readLine()!!} 0".split(" ").map{ it.toLong() }
	val move = LongArray(n+1){ i-> Math.abs(a[i]-a[i+1]) }
	val len=move.sum()
	
	(1..n).fold(StringBuilder()){ sb,i->
		val ans=len -move[i-1]-move[i] +Math.abs(a[i-1]-a[i+1])
		sb.append(ans).append("\n")
	}.let { println(it) }
}