local n=io.read("*n")
local a={}
a[1],a[n+2]=0,0
for i=2,n+1 do
    a[i]=io.read("*n")
end

local total=0
for i=1,n+1 do
    total=total+math.abs(a[i]-a[i+1])
end

for i=2,n+1 do
    local x=math.abs(a[i-1]-a[i+1])
    local y=math.abs(a[i-1]-a[i])
    local z=math.abs(a[i]-a[i+1])
    print(total+x-y-z)
end