#include <bits/stdc++.h>
#include <math.h>
using namespace std;
using ll = long long;

int f(int x){
  if(x < 0){x *= (-1);}
  return x;
}

int main(){
  int n; cin >> n;
  vector<int> v(n+10, 0);
  int time = 0;
  for(int i = 1; i <= n; i++){
    cin >> v[i];
    time += f(v[i] - v[i-1]);
  }
  time += f(v[n]);

  for(int i = 1; i <= n; i++){
    int res = time;
    if(v[i+1] >= v[i] && v[i] >= v[i-1]){cout << res << endl; continue;}
    else if(v[i+1] <= v[i] && v[i] <= v[i-1]){cout << res << endl; continue;}
    else if((v[i] - v[i-1]) * (v[i+1] - v[i-1]) <= 0){
      res -= f(v[i-1] - v[i]) * 2; cout << res << endl; continue;
      }
    else{res -= f(v[i+1] - v[i]) * 2; cout << res << endl; continue;}
  }
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep_r(i, n) for (ll i = n - 1; i >= 0; i--)
#define all(x) x.begin(),x.end()
#define resize(x, n) x.resize(n)
using pll = pair<ll, ll>;
using vl = vector<ll>;
using vvl = vector<vl>;
const ll INF = 1000000000000000000;
const ll mod = 1000000007;
const ll MAX = 100000;
struct edge {
    ll from, to, weight;
    edge(ll f, ll t, ll w) : from(f), to(t), weight(w) { }
};
vector<vector<edge>> edges;
vector<vector<ll>> graph;
vector<bool> visited;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
ll n, sum;
vl a;

ll cost(ll i) {
    return sum - abs(a[i-1]-a[i]) - abs(a[i]-a[i+1]) + abs(a[i-1]-a[i+1]);
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> n;
    resize(a, n+2);
    rep(i, n+2) {
        if (i == 0 || i == n+1) a[i] = 0;
        else cin >> a[i];
        if (i > 0) sum += abs(a[i-1]-a[i]);
    }
    rep(i, n+1) {
        if (i == 0) continue;
        printf("%ld\n", cost(i));
    }
}