#include<iostream>
#include<algorithm>
using namespace std;
int a[100005];

int main() {
	int n;
	cin >> n;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
	}
	a[0] = 0;
	a[n + 1] = 0;
	int cnt = 0;
	for (int i = 0; i < n+1; i++) {
		cnt += abs(a[i + 1] - a[i]);
	}
	for (int i = 1; i <= n; i++) {
		cout << cnt - abs(a[i + 1] - a[i]) - abs(a[i] - a[i - 1]) + abs(a[i + 1] - a[i - 1]) << endl;
	}
}