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

void main() {
  int n;
  readf (" %d", &n);
  auto a = new long[n+2];
  foreach (i; 1 .. n + 1) {
    readf (" %d", &a[i]);
  }
  long s = 0;
  foreach (i; 1 .. n + 2) {
    s += abs (a[i] - a[i-1]);
  }
  foreach (i; 1 .. n + 1) {
    writeln (s - (abs (a[i] - a[i-1]) + abs (a[i] - a[i+1])) + abs (a[i-1] - a[i+1]));
  }
}
