"use strict";
function Main(input) {
    let cin = new Inputer(input);
    let N = cin.getInt();
    let A = cin.getIntArray(N).map((v, i) => { return { coordinate: v, index: i } });
    A.sort((a, b) => a.coordinate - b.coordinate);
    let P = new Array(N);
    for (let n = 0; n < N; n++) P[A[n].index] = n;
    for (let n = 0; n < N; n++) {
        let ans = 0;
        let i = P[n];
        if (i == 0) {
            if (A[1].coordinate < 0) ans += -A[1].coordinate * 2;
            if (A[N - 1].coordinate > 0) ans += A[N - 1].coordinate * 2;
        } else if (i == N - 1) {
            if (A[0].coordinate < 0) ans += -A[0].coordinate * 2;
            if (A[N - 2].coordinate > 0) ans += A[N - 2].coordinate * 2;
        } else {
            if (A[0].coordinate < 0) ans += -A[0].coordinate * 2;
            if (A[N - 1].coordinate > 0) ans += A[N - 1].coordinate * 2;
        }
        console.log(ans);
    }
}
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"));