program probC
  implicit none
  integer,allocatable :: a(:)
  integer i,ans1,n

  read(*,*) n
  allocate(a(0:n+1))
  a=0
  read(*,*) a(1:n)

  ans1=0
  do i =1,n+1
     ans1 = ans1 + abs(a(i-1)-a(i))
  end do

  do i = 1,n
     write(*,*) ans1+abs(a(i-1)-a(i+1))-(abs(a(i-1)-a(i))+abs(a(i)-a(i+1)))
  end do
  
end program probC
