import std.stdio;
import std.string;
import std.conv;
import std.algorithm;
import std.math : abs;

void main()
{
	auto N = to!int(split(readln())[0]);
	int[] A = [0];
	A ~= to!(int[])(split(readln()));
	
	int X = 0;
	
	foreach (i; 0..N) {
		X += abs(A[i] - A[i+1]);
	}
	X += abs ( A[$-1] - A[0] );
	
	foreach ( i; 1..N ) {
		writeln(X - abs(A[i] - A[i-1]) - abs(A[i] - A[i+1]) + abs(A[i-1] - A[i+1]));
	}
	
	writeln(X - abs(A[N] - A[N-1]) - abs(A[N] - A[0]) + abs(A[N-1] - A[0]));
}