function Main(input){
	input=input.split(/\n|\s/);
	input.forEach(function(e,i,a){a[i]=Number(a[i]);});
	var ans="";
	var lg=input[0];
	input[0]=0;
	var kr=0;
	var aa=0;
	var ar=[];
	
	for(var i=1;i<=lg;i=(i+1)|0){
		aa=input[i]-input[i-1];
		kr+=(aa^(aa>>31))-(aa>>31);
		
		ar[i]=0;
		if((input[i]>input[i+1]&&input[i+1]>=input[i-1])||(input[i]<input[i+1]&&input[i+1]<=input[i-1])){
			ar[i]=input[i]-input[i+1];
			ar[i]=(ar[i]^(ar[i]>>31))-(ar[i]>>31);
			ar[i]=ar[i]<<1;
		}
		else if((input[i]>input[i-1]&&input[i-1]>=input[i+1])||(input[i]<input[i-1]&&input[i-1]<=input[i+1])){
			ar[i]=input[i]-input[i-1];
			ar[i]=(ar[i]^(ar[i]>>31))-(ar[i]>>31);
			ar[i]=ar[i]<<1;
		}
	}
	kr+=(input[lg]^(input[lg]>>31))-(input[lg]>>31);
	for(var i=1;i<=lg;i=(i+1)|0){
		aa=kr-ar[i];
		ans+=aa+"\n";
	}
	ans=ans.slice(0,ans.length-1);
	console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));