Solution for p62b.
Use leaf-node-p predicate in p61a.