import scala.io.StdIn._
object Main extends App {
  val n = readInt
  val a = s"0 $readLine 0".split(" ").map(_.toInt)
  val (sum, _) = a.foldLeft((0, 0)) { (acc, i) =>
    (acc._1 + math.abs(acc._2 - i), i)
  }
  for (i <- 1 to n) {
    println(
      sum - math.abs(a(i) - a(i - 1)) - math.abs(a(i + 1) - a(i)) + math
        .abs(a(i + 1) - a(i - 1))
    )
  }

}
