extension _ArrayType where Generator.Element == Int {
  func f(i: Int, _ j: Int) -> Int {
    return abs(self[i] - self[j])
  }
}
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 + f($1,$1+1)}
for i in 1...N {
  let ans: Int = sum + f(i-1, i+1) - f(i-1, i) - f(i, i+1)
  print(ans)
}