import std.stdio;
import std.range;
import std.array;
import std.string;
import std.conv;
import std.typecons;
import std.algorithm;
import std.container;
import std.typecons;
import std.random;
import std.math;
import core.time;

void main()
{
	int n = readln.chomp.to!int;
	int[] a = 0 ~ readln.chomp.split.map!(to!int).array ~ 0;
	int sum = 0;
	int prev = 0;
	foreach (v; a) {
		sum += abs = prev - v;
		prev = v;
	}
	foreach (i; iota(1,a.length-1)) {
		int v = a[i];
		int sub = sum;
		sub -= abs = v - a[i - 1];
		sub -= abs = v - a[i + 1];
		sub += abs = a[i - 1] - a[i + 1];
		sub.writeln;
	}
}
