#include<cstdio>
#include<algorithm>
using namespace std;
#define MAXN 100000
int a[MAXN+5];
int n,sum;
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
		sum+=abs(a[i]-a[i-1]);
	}
	sum+=abs(a[n+1]-a[n]);
	for(int i=1;i<=n;i++)
	{
		if((a[i]-a[i-1]<=0)==(a[i+1]-a[i]<=0))
			printf("%d\n",sum);
		else printf("%d\n",sum-2*(min(abs(a[i]-a[i-1]),abs(a[i+1]-a[i]))));
	}
}