let N =
    stdin.ReadLine()
    |> int
let A =
    stdin.ReadLine().Split()
    |> Array.map int

let A' = Array.concat [|[|0|];A;[|0|]|]

let dist =
    Array.pairwise A'
    |> Array.sumBy (fun (x,y) -> abs (x-y))

Array.windowed 3 A'
|> Array.map (fun [|a;b;c|] ->
    dist - (abs (b-a)) - (abs (c-b)) + (abs (c-a))
    |> stdout.WriteLine)
|> ignore