       (loop [i unit-count]
         (when (> i 0)
           (let [unit-id (read)
-                unit-type (read)
+                unit-type (nth unit-types (read))
                 player-id (read)
                 mass (read)
                 radius (read)

; the standard input according to the problem statement.

(require '[clojure.string :as string])

(defrecord Unit
  [unit-id unit-type player-id mass radius x y vx vy extra extra2])

  "Test whether 'my-unit' is 'in' the 'other-unit'"
  (< (distance (:x my-unit) (:y my-unit) (:x other-unit) (:y other-unit)) (:radius other-unit)))

(defn compute-reaper-action [my-reaper next-wreck]
  (cond
    (nil? next-wreck) "WAIT"
    (in my-reaper next-wreck) "WAIT"
    true (str (:x next-wreck) " " (:y next-wreck) " 200")))

(defn compute-destroyer-action [my-destroyer next-tanker]
  (cond
    (nil? next-tanker) "WAIT"
    (in my-destroyer next-tanker) (str (:x next-tanker) " " (:y next-tanker) " 0")
    true (str (:x next-tanker) " " (:y next-tanker) " 300")))

(defn -main [& args]
  (while true
