#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main(){
	int n;
	cin >> n;
	int a[n+2];
	a[0] = 0;
	a[n+1] = 0;
	ll sum = 0;
	for(int i = 1; i <= n+1; i++){
		if(i != n+1)cin >> a[i];
	   	sum += abs(a[i]-a[i-1]);
	}
	for(int i = 1; i <= n; i++){
		cout << sum - abs(a[i]-a[i-1]) - abs(a[i+1]-a[i]) + abs(a[i+1]-a[i-1]) << endl;
	}
    return 0;
}