hans409,
At a quick first glance, I noticed that you haven't set the variable B to contain a list at the beginning of the code. You have set C to be car B, and then B to be cdr of itself. When you are first running this, there are no lists set to these variables.
Hope this helps,
Paul