object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt()
  val a = 0 +: Vector.fill(n)(sc.nextInt()) :+ 0

  def cost(x: Int, y: Int): Int = (x - y).abs

  val sum = a.sliding(2).map{case Vector(x, y) => cost(x, y)}.sum

  val pw = new java.io.PrintWriter(Console.out)
  a.sliding(3).foreach{case Vector(x, y, z) =>
    println(sum - cost(x, y) - cost(y, z) + cost(x, z))
  }
  pw.flush()
}
