Thinking that recursion might be the way, imagining a tree