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()));
	
	foreach (i; 1..N+1) {
		
		auto A2 = A[0..i] ~ A[i+1..$];
		int n, res;
		while (n <= N-2) {
			res += abs(A2[n] - A2[n+1]);
			n += 1;
		}
		
		writeln(res + abs(A2[$-1] - A2[0]));
	}
}