let inline scan () = System.Console.ReadLine()
let inline split (s: string) = s.Split(' ')

let n = scan () |> int
let xs = scan () |> split |> Array.map int |> List.ofArray

let inline skipNth n xs = xs |> List.mapi (fun i x -> if i + 1 = n then None else Some x) |> List.choose id

for i in 1..n do
  xs @ [0] |> skipNth i
           |> List.fold (fun (budget, location) next -> (budget + abs (next - location), next)) (0, 0)
           |> fst |> printfn "%i"

