"use strict";
function Main(input) {
    let cin = new Inputer(input);
    let N = cin.getInt(), A = cin.getIntArray(N);
    let S = new Array(N);
    for (let n = 0; n < N; n++) S[n] = Math.sign(A[n]);
    const before = (v) => {
        while (A[v] == undefined) v--;
        return A[v];
    }
    for (let n = 0; n < N; n++) {
        let ans = 0;
        let start, end;
        let save = undefined;
        if (n == 0) {
            start = 1;
            end = N - 1;
        } else if (n == N - 1) {
            start = 0;
            end = N - 2;
        } else {
            start = 0;
            end = N - 1;
            save = A[n], A[n] = undefined;
        }
        let dir = S[start];
        for (let m = start; m <= end; m++) {
            if (A[m] == undefined) continue;
            if (dir != S[m]) {
                ans += Math.abs(before(m - 1) * 2);
                dir = S[m];
            }
        }
        if (dir == S[end]) ans +=Math.abs(A[end] * 2);
        console.log(ans);
        if (save != undefined) A[n] = save;
    }
}
class Inputer{constructor(t){if(typeof t=='undefined')throw new Error('引数（stdin）を省略できません！');this.cnt=0,this.items=t.split(/\n|\s/)}getInt(){return this.items[this.cnt++]-0}getIntArray(t){if(typeof t=='undefined')throw new Error('引数（1以上）を省略できません！');let r=new Array(t);for(let e=0;e<t;e++)r[e]=this.getInt();return r}getStr(){return this.items[this.cnt++]}getStrArray(t){if(typeof t=='undefined')throw new Error('引数（1以上）を省略できません！');let r=new Array(t);for(let e=0;e<t;e++)r[e]=this.getStr();return r}}
if (typeof window == "undefined") Main(require("fs").readFileSync("/dev/stdin", "utf8"));