Yes! I made it works!
The mistake was so lame. It was about formatting the text to stream.
I used the incorrect directive in format function. So it printed the solution string surrounded with quotes, and i always got WA. For example,
instead of
Then (with "~s" directive):
(format t "~s~%" (solve line))
Now (with "~a" directive):
(format t "~a~%" (solve line))