#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  vector<int> a(n+1,0);
  for(int i=1;i<=n;i++)
    cin>>a.at(i);
  vector<int> d(n+1);
  int s=0;
  for(int i=0;i<n;i++){
    d.at(i)=abs(a.at(i+1)-a.at(i));
    s+=d.at(i);
  }
  d.at(n)=abs(a.at(n));
  s+=d.at(n);
  for(int i=1;i<=n;i++){
    if(min({a.at(i-1),a.at(i),a.at((i+1)%(n+1))})==a.at(i)||max({a.at(i-1),a.at(i),a.at((i+1)%(n+1))})==a.at(i))
      cout<<s-2*min(d.at(i-1),d.at(i))<<endl;
    else
      cout<<s<<endl;
  }
}
#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < n; ++i)
typedef long long ll;
using namespace std;
const int INF = 1e9;

int main() {
    int n;
    cin >> n;
    vector<int> a(n + 2), d(n + 1), sd(n);
    rep(i, n) cin >> a[i + 1];

    int sum = 0;
    rep(i, n + 1) {
        d[i] = abs(a[i + 1] - a[i]);
        sum += d[i];
    }

    rep(i, n)
        sd[i] = abs(a[i + 2] - a[i]);

    rep(i, n) {
        cout << sum - d[i] - d[i + 1] + sd[i] << "\n";
    }

    return 0;
}