let N=Int(readLine()!)!,A=[0]+readLine()!.characters.split(" ").map{Int(String($0))!}+[0],sum=(0...N).reduce(0){$0+abs(A[$1]-A[$1+1])}
_=(1...N).map{i in print(sum+abs(A[i-1]-A[i+1])-abs(A[i-1]-A[i])-abs(A[i]-A[i+1]))}