#import <stdio.h>
#import <stdlib.h>
#define ABS(a) ((a)>0?(a):(-(a)))
#define MIN(a,b) ((a)<(b)?(a):(b))

long minus(long a, long b, long c) {
    return (b-a)*(c-b)<0 ? 2*MIN(ABS(b-a),ABS(c-b)) : 0;
}

int main() {
    long N;
    scanf("%ld", &N);
    long *A = (long*)malloc(N * sizeof(long));
    long *MINUS = (long*)malloc(N * sizeof(long));

    A[0] = 0;
    long n;
    long i = 1;
    long SUM = 0;
    long current = 0;
    while (scanf("%ld", &n) != EOF) {
        A[i]=n;
        SUM += ABS(n-current);
        current = n;
        if (i>=2) {
            MINUS[i-1] = minus(A[i-2], A[i-1], A[i]);
        }
        i++;
    }
    SUM += ABS(current);
    MINUS[N] = minus(A[N-1],A[N],0);

    for (i=1;i<=N;i++) {
        printf("%ld\n", SUM-MINUS[i]);
    }
}
