#include <bits/stdc++.h>
 
using namespace std;
typedef long long ll;
typedef vector<int> VI;
ll mm=1000000000;ll MM=mm+7;
#define rep(i, n) for(int i=0;i<n;i++)
#define PI 3.141592653589793


   
int main(){
   int n;
   cin >> n;
   VI a(n+2);
   a[0]=0;
   a[n+1]=0;
   for(int i=1;i<=n;i++){
      cin >> a.at(i);
   }
   ll ro=0;
   rep(i,n+2){
      ro+=abs(a[i]-a[i+1]);
   }
   for(int i=1;i<=n;i++){
      if((a[i]-a[i-1])*(a[i+1]-a[i])>=0){
         cout << ro << endl;
      }
      else{
         int z=min(abs(a[i]-a[i-1]),abs(a[i+1]-a[i]));
         cout << ro-2*z << endl;
      }
   }
}
    

#include <iostream>
#include <vector>
#include <cstdio>

//2^32/26 = 165191049.846153846153846 = 165191050
#define MAGIC 0x9D89D8A

char shift (char c, int amount)
{
    long n;
    long q ;
    long r;
    
    n = (long) c - 'a' +  amount;
    q = n * MAGIC;
    q >>= 32;
    r = n - q * 26;
    
    return (char) 'a' + r;
}

void shiftString (char* s, int amount)
{
    int i = 0;
    while (s[i]) {
        
        if (s[i] == ' ') {}
        else if (s[i] == '.') {}
        else { s[i] = shift(s[i], amount); }
        i++;
    }
    
}

int main(int argc, const char * argv[]) {

   
    char buffer[256];
    std::string line;
    std::vector<std::string> listString;
    int result = 0;
    std::size_t found;
    
    
    while (std::getline(std::cin, line))
    {
        //sprintf(buffer, "%s", line.c_str());
        listString.push_back(line);
    }
    
    
    std::vector<std::string>::iterator it;
    
    it = listString.begin();
    
    do {
        result = 0;
        sprintf(buffer, "%s", (*it).c_str());
        
        while (!result)
        {
            
            shiftString(buffer, -1);
            line = buffer;
            
            result = 0;
            
            found = line.find("the");
            result += found!=std::string::npos;
            
            found = line.find("this");
            result += found!=std::string::npos;

            found = line.find("that");
            result += found!=std::string::npos;

        }
        
        printf("%s\n", buffer);
        
    } while (++it < listString.end());

    return 0;
}