N = gets().to_i
As = gets().split(" ").map(&:to_i)

# 山i と 山i+2 の差分
diffStep2 = (0..(N - 1)).map { |i|
  plus2 = (i + 1) < N ? (i + 1) : (i + 1 - N)
  2 * (As[plus2] - As[i])
}

# 山i と 山i+1の差分
diffStep1 = (0..(N - 1)).map { |i|
  accuratedDiff = 0
  ((i + 2)..(i + N + 1)).step(2).each { |j|
    from = (j - 2) < N ? (j - 2) : (j - 2 - N)

    accuratedDiff += diffStep2[from]
  }
  accuratedDiff
}

rainAmounts = (0..(N - 1)).map { |i|
  As[i] - diffStep1[i] / 2
}

puts rainAmounts.join(" ")
