          end (-> (count items)
                  (dec))]
     (let [middle (-> (+ begin end)
-                     (quot 2))
-          items (vec items)]
+                     (quot 2))]
       (if  (> begin end)
         -1
         (cond

          :else
          (inc middle))))))

(defn read-values [total]
  (loop [reverse-index total
         vals []]
    (if (== reverse-index 0)
      vals
      (recur (dec reverse-index)
             (concat vals [(Integer/parseInt (read-line))])))))


(defn process-print [index marbles queries]
  (printf "CASE# %d:%n" index)
  (loop [queries queries]
    (let [query (first queries)
          position (binary-search query marbles)]


(defn main []
  (loop [line (read-line)
         test-case-index 1]
    (let [[n q] (->> (str/split line #" ")
                     (map #(Integer/parseInt %)))
          marbles (-> (read-values n)
                      (sort)
                      (vec))
          queries (-> (read-values q)
                      (reverse))]
      (when (and (not= n 0) (not= q 0))
        (process-print test-case-index marbles queries)
        (recur (read-line) (inc test-case-index))))))

(main)
