I have in LISP a tree represented as list as follows:
(A 2 B 0 C 2 D 0 E 0)

That means A have 2 childrens (B and C), B have 0, and so on...

My task is to write each level of the tree.

I know about this post: [LISP Displaying binary tree level by level](https://stackoverflow.com/questions/384419/lisp-displaying-binary-tree-level-by-level) , but how can I use my list representation instead of that on that post?

[![enter image description here](https://i.stack.imgur.com/RxsSE.png)](https://i.stack.imgur.com/RxsSE.png)