integer N
integer(8),allocatable,dimension(:)::A
integer(8) Yotei
read*,N
allocate(A(0:N+1))
A(0)=0
read*,A(1:N)
A(N+1)=0
do i=1,N+1
  Yotei=Yotei+abs(A(i)-A(i-1))
end do
do i=1,N
  print"(i0)",Yotei-(abs(A(i)-A(i-1))+abs(A(i+1)-A(i)))+abs(A(i-1)-A(i+1))
end do
end