import qualified Data.ByteString.Char8 as C
import qualified Data.Vector.Unboxed as V

main = sol <$> readLn <*> get >>= put

get = V.unfoldr (C.readInt . C.dropWhile (<'0')) <$> C.getLine

put = putStrLn . unwords . map show . V.toList

sol n v = V.generate n ((v V.!) . f) where
  f i = abs (2*i-n) - if i<(n+1) `div` 2 then 1 else 0