import std;

alias sread = () => readln.chomp();
alias lread = () => readln.chomp.to!long();
alias aryread(T = long) = () => readln.split.to!(T[]);

void main()
{
    auto n = lread();
    auto a = aryread();
    // writeln(a);
    long cost;
    auto new_a = new long[](n + 2);
    foreach (i; 0 .. n)
    {
        new_a[i + 1] = a[i];
    }
    // writeln(new_a);
    foreach (i; 0 .. (new_a.length - 1))
    {
        cost += abs(new_a[i] - new_a[i + 1]);
    }
    // writeln(cost);
    foreach (i; 1 .. (new_a.length) - 1)
    {
        // writeln(i - 1, i, i + 1);
        writeln(cost - (abs(new_a[i - 1] - new_a[i]) + abs(new_a[i] - new_a[i + 1])) + abs(
                new_a[i - 1] - new_a[i + 1]));
    }

}

void scan(L...)(ref L A)
{
    auto l = readln.split;
    foreach (i, T; L)
    {
        A[i] = l[i].to!T;
    }
}
