#include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <algorithm>
#include <stack>
#include <cstring>
#include <queue>
#include <set>
#include <map>

using namespace std;

const int maxN = 1e6 + 10, oo = 23041997, modP = 1e7, maxC = 50;

#define FORU(i, l, r) for (int i = l; i <= r; ++i)
#define FORD(i, r, l) for (int i = r; i >= l; --i)
#define REPU(i, r) for (int i = 0; i < r; ++i)
#define F first
#define S second
#define PB push_back
#define LL long long
#define BIT(x, i) ((x >> i) & 1)
#define PINT pair < int, int >

int n, a[maxN], res;

int main() {
    cin >> n;
    FORU(i, 1, n) cin >> a[i];
    a[0] = a[n + 1] = 0;
    FORU(i, 0, n)
        res += (int) abs(a[i] - a[i + 1]);
    FORU(i, 1, n) {
        int tmp1 = (int) abs(a[i] - a[i + 1]);
        int tmp2 = (int) abs(a[i] - a[i - 1]);
        int tmp3 = (int) abs(a[i - 1] - a[i + 1]);
        cout << res - tmp1 - tmp2 + tmp3 << endl;
    }
}
