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

		for(i <- 0 until spot.size) {
			var res = 0
			var nowLocation = 0

			for(j <- 0 until spot.size) {
				if(i != j) {
					res += getPrice(nowLocation, spot(j))
				        nowLocation = spot(j)
				}
			}

			res += getPrice(nowLocation, 0)
			println(res)
		}
	}

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