 
 (defn ask-question [answers]
   (let [feature (first (first answers))]
-    (println "What is the value of feature: " feature "?")
+    (println "What is the value of feature:" feature "?")
     (let [indexed-answers (print-answers answers)]
       (println "0. Nothing of the kind" )
-      (print "Answer (number of the option): ")
+      (print "Answer (number of the option):")
       (flush)
       (let [cr (ConsoleReader.)
             user-choise (.readLine cr)]
         (try
           (let [answer-number (Integer/parseInt user-choise)]
+            (if (= 0 answer-number)
+              (throw (IllegalStateException. (str "subject don't corresponds any of options for feature: " feature))))
             (if-let [answer (indexed-answers answer-number)]
               answer
-              (repeat-question answers)
-              #_(throw (IllegalStateException. (str "Subject don't corresponds any of options for feature: " feature)))))
-          (catch NumberFormatException e (repeat-question answers)))
-        ))))
+              (repeat-question answers)))
+          (catch NumberFormatException e (repeat-question answers)))))))
 
 (defn answers [tree]
   (into #{}

    (time (pprint tree))
    (pprint subject-matrix)
    (println "Now let's define what is the subject in front of you by answering questions")
    (let [alternatives (find-out tree)]
      (if (= (count alternatives) 1)
        (println "Your subject is: " (first alternatives))
        (println "Feature matrix is not unique, so got following alternatives: " alternatives)))))

(comment
  (-main)
  (print-table [:value1 :value2] [{:value1 1 :value2 2}{:value1 3 :value2 4}])
  (time (pprint (solve-tree subject-matrix)))
  (solve-tree [["f1" ["yes" "yes" "no" "no"]] ["f2" ["1" "2" "2" "—"]]] nil)

      (find-out children)
      (map #(get subject-names %) (:alternatives chosen-subtree)))))

(defn -main
  [& args]
  (println "Here is a solve tree for subject matrix:")
