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

const int N = 1e5 + 10;

int n, a[N], sum[N];

int main(){
	scanf("%d", &n);
	for(int i=1; i<=n; i++)	scanf("%d", a+i);
	a[0] = a[n+1] = 0;
	sum[n+1] = 0;
	for(int i=n; i>=1; i--){
		sum[i] = sum[i+1] + abs(a[i] - a[i+1]);
	}
	int cur = 0;
	for(int i=1; i<=n; i++){
		printf("%d\n", cur + sum[i+1] + abs(a[i-1] - a[i+1]));
		cur = cur + abs(a[i-1] - a[i]);
	}
	return 0;
}
