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