(defn tmp
  [a]
  (loop [a a, b []]
    (if-let [f (first a)]
      (recur (rest a)
             (reverse (conj b f)))
      (->> (reverse b)
           (interpose " ")
           (apply str)))))


(let [n (-> (line-seq (java.io.BufferedReader. *in*))
            first)
      a (-> (line-seq (java.io.BufferedReader. *in*))
            first)]
  (println (tmp (clojure.string/split a #" "))))
