It appears the tree is of a fixed length of 8. This code appears to be easily modified to produce a tree of variable depth