import scala.io._
object Main {
	def main(args: Array[String]) {
		val input = Source.fromInputStream(System.in)
		val lines = input.getLines.toList
		
		val spot = 0 :: lines(1).split(" ").map(_.toInt).toList ::: List(0)

		var total = 0
		var nowLocation = 0

		spot.foreach {
			s =>
			total += getPrice(nowLocation, s)
			nowLocation = s
		}
		
		for(i <- 1 until spot.size -1) {
			nowLocation = spot(i)

			if(spot(i-1) < nowLocation && nowLocation < spot(i+1)) {
				println(total)
			}else{
				println(total - getPrice(spot(i), spot(i-1)))
			}
		}

	def getPrice(x: Int, y: Int): Int = {
		val res = x - y
		if(res < 0) {
			return -res
		}else{
			return res
		}
	}
}
