#include <bits/stdc++.h>
using namespace std;

static const int MAX_N = 100010;
int N, sum=0;
int A[MAX_N], cost[MAX_N];

int main(int argc, char* argv[]){
  cin >> N;
  for(int i = 1; i <= N; i++) cin >> A[i];
  A[0] = A[N+1] = 0;
  for(int i = 1; i <= N+1; i++){
	cost[i] = abs(A[i]-A[i-1]);
	sum+=cost[i];
  }
  for(int i = 1; i <= N; i++)
	cout << sum-cost[i]-cost[i+1]+abs(A[i+1]-A[i-1]) << endl;
  return 0;
}