#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main() {
	int n; cin >> n;
	vector<int>a(n + 2, 0); for (int i = 1; i <= n; i++)cin >> a[i];
	int sum = 0; for (int i = 1; i < a.size(); i++)sum += abs(a[i] - a[i - 1]);
	
	int ans = 0;
	for (int i = 1; i <= n; i++) {
		ans = sum + abs(a[i + 1] - a[i - 1]) - (abs(a[i - 1] - a[i]) + abs(a[i] - a[i + 1]));
		cout << ans << endl;
	}

	return 0;
}