Add class for nodes in and-or tree.