#include<bits/stdc++.h>
#include<map>
#define ll          long long
#define pb          push_back
#define mp          make_pair
#define pii         pair<int,int>
#define vi          vector<int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (int)x.size()
#define hell        1000000007
#define endl        '\n'
#define rep(i,a,b)  for(int i=a;i<b;i++)
#define rep1(i,a,b) for(ll i=a;i<= b;i++)
#define PI          3.14159
#define MAX         1000001
//sconst ll maxn = (ll)1e18;
using namespace std;
int gcd(ll a,int b){

//Special case for a<b
	if(a<b){
		return gcd(b,a);
	}
	// Base case
	if(b == 0){
		return a;
	}

	// Answer step applying EUCLID'S ALGORITHM
	return gcd(b,a%b);
}
class Triplet{
public:
	ll gcd;
	ll x;
	ll y;
};
Triplet gcdExtendedEuclid(int a,int b){
	//Base Case
	if(b==0){
		Triplet myAns;
		myAns.gcd = a;
		myAns.x = 1;
		myAns.y = 0;
		return myAns;

	}
	Triplet smallAns = gcdExtendedEuclid(b,a%b);
	//Extended euclid says

	Triplet myAns;
	myAns.gcd = smallAns.gcd;
	myAns.x  = smallAns.y;
	myAns.y = (smallAns.x - ((a/b)*(smallAns.y)));
	return myAns;	
}

ll modInverse(int A,int M){
	Triplet ans = gcdExtendedEuclid(A,M);
	return ans.x;
	
}
bool check(vector<ll>& v1,ll val,ll h)
{
	ll ans = 0;
	for(ll i = 0 ; i < v1.size(); i++)
	{
		ans += v1[i]/val;
		if(v1[i] % val != 0)
		{
			ans += 1;
		}
	}
	if(ans > h)
	{
		return false;
	}
	return true;
}
void multiply(ll A[2][2],ll M[2][2])
{
	ll firstValue = (A[0][0] * M[0][0] + A[0][1] * M[1][0])%hell;
	ll secondValue = (A[0][0] * M[0][1] + A[0][1] * M[1][1])%hell;
	ll thirdValue = (A[1][0] * M[0][0] + A[1][1] * M[1][0])%hell;
	ll fourthValue = (A[1][0] * M[0][1] + A[1][1] * M[1][1])%hell;
	A[0][0] = firstValue;
	A[0][1] = secondValue;
	A[1][0] = thirdValue;
	A[1][1] = fourthValue;
	return;
}
void getpow(ll A[2][2],ll n)
{
	if(n == 0 || n == 1)
	{
		return ;
	}
	getpow(A,n/2);
	multiply(A,A);
	if(n % 2 != 0)
	{
		ll F[2][2] = {{1,1},{1,0}};
		multiply(A,F);
	}
	return;
}
ll getpow1(ll n,ll m,ll b)
{
	if(m == 0)
	{
		return 1;
	}
	ll ans = getpow1(n,m/2,b) % b;
	ans = (ans * ans)%b;
	if(m % 2 != 0)
	{
		ans = ans*n%b;
	}
	return ans % b;
}
ll getfib(ll n)
{
	if(n == 0)
	{
		return 0;
	}
	ll A[2][2] = {{1,1},{1,0}};
	getpow(A,n);
	ll F[1][2];
	F[0][0] = 0;
	F[0][1] = 1;
	ll ans = F[0][0]* A[0][0] + F[0][1]*A[1][0];
	return ans % hell;
}
vector<ll>* sieve()
{
	bool isprime[MAX];
	for(ll i = 0 ; i < MAX; i++)
	{
		isprime[i] = true;
	}
	vector<ll>* primes = new vector<ll>();
	for(ll i = 2 ; i < MAX; i++)
	{
		if(isprime[i] == true)
		{
			for(ll j = 2*i ; j < MAX; j += i)
			{
				isprime[j] = false;
			}
	    }
	}
	primes->push_back(2);
	for(ll i = 3 ; i < MAX; i++)
	{
		if(isprime[i] == true)
		{
			primes->push_back(i);
		}
	}
	return primes;
}
ll getpow2(ll a,string& b,ll m)
{
    ll mod = hell;
	ll num = 1;
    //cout << b.size();
    for(ll i = b.size() - 1;i >= 0; i--)
    {
      if(b[i] == 1)
      {
        num = (num * a)%m;
        //cout << num << endl;
        //cout << "*";
      }
      else if(b[i] == 2)
      {
        num = ((num * a)%m * a)%m;
      }
      //cout << num << " *"  <<endl;
      a = ((a*a)%m * a)%m;
      //cout << a << endl;
    }
  return num %m;
}
bool check(ll i,ll m)
{
	ll ret = 0;
	i = i/5;
	while(i)
	{
		ret += i;
		i = i/5;
	}
	return(ret == m);
}
set<ll>s;
ll arr[1000002];
int main() 
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    ll n,d,x;
    cin >> n ;
    arr[0] = 0;
    arr[n + 1] = 0;
    ll sum = 0;
    for(ll i = 1 ; i <= n; i++)
    {
    	cin >> arr[i];
    }
    for(ll i = 1; i <= n + 1 ; i++)
    {
    	sum += abs(arr[i] - arr[i - 1]);
    	//cout << arr[i] << endl;
    }
    //cout << sum << endl;
    for(ll i = 1 ; i <= n; i++)
    {
    	ll sum1 = sum;
    	if(arr[i] >= arr[i-1] && arr[i + 1] >= arr[i])
    	{
    		cout << sum1 << endl;
    		continue;
    	}
    	else if(arr[i] <= arr[i - 1] && arr[i + 1] <= arr[i])
    	{
    		cout << sum1 << endl;
    		continue;
    	}
    	else
    	{
    		sum1 = sum1 - abs(arr[i + 1] - arr[i]) - abs(arr[i] - arr[i - 1]);
    		sum1 += abs(arr[i + 1] - arr[i - 1]);
    	}

    	cout << sum1 << endl;
    }
    return 0;
}


Measured memory_bytes: 2048