#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,b,a) for(int i=b;i>=a;i--)
#define fori(a) for(auto i : a )
#define all(a) begin(a), end(a)
#define set(a,b) memset(a,b,sizeof(a))
#define sz(a) a.size()
#define pi 3.14159
#define ll long long
#define ull unsigned long long
#define pb push_back
#define PF push_front //deque
#define mp make_pair
#define pq priority_queue
#define mod 1000000007
#define f first
#define s second
#define pii pair< int, int >
#define vi vector<int>
#define vpii vector<pii>
#define debug(v) for(auto i:v) cout<<i<<" ";
#define tc int t; cin >> t; while(t--)

using namespace std;
string repeat(string s, int n) {
    string s1 = "";
    for (int i=0; i<n;i++)
        s1+=s;
    return s1;
}
string getString(char x) {
    string s(1, x);
    return s;
}

void optimizeIO(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}
int gcd(int a, int b){
    if (a == 0)  return b;
    return gcd(b % a, a);
}
void solve(){
  int n;
  cin>>n;
  int a[n+2];
  rep(i,1,n+1) cin>>a[i];
  a[0]=0;
  a[n+1]=0;
  // int mn=*min_element(a,a+n),mx=*max_element(a,a+n);
  int v1[n+1],pref[n+1];
  rep(i,0,n+1) v1[i]=abs(a[i+1]-a[i]);//a[i+1]*a[i]>=0?abs(a[i+1]-a[i]):abs(a[i+1]-a[i])*2;
  pref[0]=v1[0];
  rep(i,1,n+1) pref[i]=pref[i-1]+v1[i];
  rep(i,1,n+1){
    ll ans=abs(a[i+1]-a[i-1])-abs(a[i]-a[i-1])-abs(a[i+1]-a[i])+pref[n];
    cout<<ans<<endl;
  }
}
int main(){
    optimizeIO();
    // tc
    { solve();
    }
}

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define REP(i,n) for (int64_t i=0; i<(n); ++i)
#define P pair<int,int>
using ll=int64_t;
using namespace std;
#define ketasuu(n) fixed<<setprecision(n)
#define btoe(p) p.begin(),p.end()
#define etob(p) p.rbegin(),p.rend()




int main(){
    int n; cin>>n;
    vector<int> p(n);
    rep(i,n) cin>>p[i];
    int sum=0;
    rep(i,n-1){
        sum+=abs(p[i]-p[i+1]);
    }
    sum+=abs(p[0]); sum+=abs(p[n-1]);
    if(p[0]*(p[1]-p[0])>=0){
        cout<<sum<<endl;
    }else{
        cout<<sum-2*min(abs(p[0]), abs(p[1]-p[0]))<<endl;
    }
    for(int i=1; i<n-1; ++i){
        if((p[i-1]-p[i])*(p[i]-p[i+1])>=0){
            cout<<sum<<endl;
        }else{
            cout<<sum-2*min(abs(p[i-1]-p[i]), abs(p[i]-p[i+1]))<<endl;
        }
    }
    if((p[n-2]-p[n-1])*p[n-1]>=0){
        cout<<sum<<endl;
    }else{
        cout<<sum-2*min(abs(p[n-2]-p[n-1]), abs(p[n-1]))<<endl;
    }
    return 0;
}