reverse' [] ys = ys
reverse' (x:xs) ys = reverse' xs (x:ys)

reverse xs = reverse' xs []

push a b n
  | odd n = b ++ a
  | otherwise = reverse' a b
 
pushAll [] b n
  | odd n = reverse b
  | otherwise = b
pushAll (a:as) b n = pushAll as (push a b n) (n-1)
 
main = do
  n <- readLn
  as <- words <$> getLine
  print $ pushAll as [] n