program A331C
    implicit none
    integer(8)::N,c_all,ans,i
    integer(8),allocatable,dimension(:)::A
    read*,N
    allocate(A(N))
    read*,A
    c_all=abs(A(1))+abs(A(N))
    do i=1,N-1
        c_all=c_all+abs(A(i+1)-A(i))
    end do

    do i=1,N
        if(i==1)then
            ans=c_all-abs(A(1))-abs(A(2)-A(1))+abs(A(2))
        else if(i==N)then
            ans=c_all-abs(A(N)-A(N-1))-abs(A(N))+abs(A(N-1))
        else
            ans=c_all-abs(A(i+1)-A(i))-abs(A(i)-A(i-1))+abs(A(i+1)-A(i-1))
        end if
        print'(i0)',ans
    end do
end program A331C