let N=Int(readLine()!)!
let A=[0]+readLine()!.characters.split(" ").map{Int(String($0))!}+[0]
let sum=(0...N).reduce(0){$0+abs(A[$1]-A[$1+1])}
(1...N).forEach{i in print(sum+abs(A[i-1]-A[i+1])-abs(A[i-1]-A[i])-abs(A[i]-A[i+1]))}