import std.algorithm;
import std.range;
import std.stdio;
import std.math;
import std.array;
import std.string;
import std.conv;

/// 数列の読み込み
auto readNums(T = int)() {
	return readln().chomp.split.map!(to!T).array;
}

/// 数の読み込み
auto readNum(T = int)() {
	return readNums!T.front;
}

/// 指定行数読み込み
auto readRows(size_t rows) {
	return generate(() => readln().chomp).take(rows).array;
}

/// 範囲の計算
auto range(T)(T a, T b, T c, T d) {
    auto start = max(a, c);
    auto end = max(b, d);
    return (start < end) ? tuple(start, end) : tuple(cast(T) 0, cast(T) 0);
}

auto maxElement(R)(R r) {
    return r.reduce!((a, b) => max(a, b));
}

auto minElement(R)(R r) {
    return r.reduce!((a, b) => min(a, b));
}

struct Course {
	int from;
	int to;
	@property int distance() const @safe pure nothrow @nogc {
		return abs(to - from);
	}
	int cumulative;
}

void main() {
	immutable n = readNum();
	const nums = 0 ~ readNums() ~ 0;
	auto courses = zip(nums[0 .. $ - 1], nums[1 .. $])
		.map!(e => Course(e[0], e[1], abs(e[1] - e[0])))
		.array;
	immutable total = courses.map!(e => e.distance).sum;
	int cum = 0;
	foreach(ref c; courses) {
		cum += c.distance;
		c.cumulative = cum;
	}
	foreach(const ref e; zip(courses[0 .. $ - 1], courses[1 .. $])) {
		writefln("%d", total - e[0].distance - e[1].distance + abs(e[1].to - e[0].from));
	}
}
