#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ll n;
    cin>>n;
    ll a[n+2];
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
    }
    a[0] =a[n+1] = 0;
    ll sum = 0;
    for(int i=1;i<=n+1;i++)
    {
        sum += abs( a[i] - a[i-1 ] );
    }
    for(int i=1;i<=n;i++)
    {
        cout<< sum + abs( a[i+1 ] -a[i-1] ) - abs( a[i] - a[i-1 ] ) - abs( a[i+1] - a[i]) <<endl;
    }
}