
(defn add-left?
  [n counter]
  (or (and (odd? n)
           (even? counter))
      (and (even? n)
           (odd? counter))))

(defn tmp4
  [n acoll]
  (let [half (Math/ceil (/ n 2))
        left-acc  (object-array half)
        right-acc (object-array half)]
    (loop [a acoll, counter 0, right 0 left 0]
      (if-let [f (first a)]
        (do
          (if (add-left? n counter)
            (aset ^objects left-acc  (- half (inc left)) f)
            (aset ^objects right-acc right f))
          (recur (rest a)
                 (inc counter)
                 (if (add-left? n counter) right (inc right))
                 (if (add-left? n counter) (inc left) left)))
        (do
          (dotimes [x half]
            (print (aget ^objects left-acc x) " "))
          (dotimes [x half]
            (print (aget ^objects right-acc x) " ")))))))


(let [[n a](->> (line-seq (java.io.BufferedReader. *in*))
                (take 2)
                vec)
      a (clojure.string/split a #" ")]
  (tmp4 (count a) a))