#include<bits/stdc++.h>
using namespace std;
int n,a[100010];
int main(){
	int i,j;
	scanf("%d",&n);
	for(i = 1;i <= n;++i) scanf("%d",&a[i]);
	int as = 0;
	for(i = 1;i <= n + 1;++i) as += abs(a[i] - a[i - 1]);
	int tmp;
	for(i = 1;i <= n;++i){
		tmp = abs(a[i + 1] - a[i - 1]) - abs(a[i + 1] - a[i]) - abs(a[i] - a[i - 1]);
		printf("%d\n",as + tmp);
	}  
	return 0;
} 