N=io.read("n")
A={}
A[1]=0
for i=2,N+1 do
  A[i]=io.read("n")
end
table.insert(A,0)
local total=0
for i=2,N+2 do
  total=total+math.abs(A[i]-A[i-1])
end
for i=2,N do
  if A[i]>math.min(A[i-1],A[i+1]) and math.max(A[i-1],A[i+1]) then
    print(total)
    elseif A[i]<math.min(A[i-1],A[i+1]) then
      print(total-2*(math.min(A[i-1],A[i+1])-A[i]))
      elseif  A[i]>math.max(A[i-1],A[i+1]) then
        print(total-2*(A[i]-math.max(A[i-1],A[i+1])))
  end
end