Start with 7 trees, called 1,2,3,4,5,6,7. Write 0 for the tree with no branches. If a and b are trees, write [a,b] for the tree that comes from attaching a and b to the ends of left and right branches coming out of a root. Case 1. At least one of the first four trees is non-empty. Output the tree [[[[[[7, 6], 5], 4], 3], 2], 1]. Case 2. Trees 1 through 4 are empty, but tree 5 is not, say 5 = [5a, 5b]. Output the tree [[[[0, 7], 6], 5a], 5b] Case 3. Trees 1 through 5 are empty, but tree 6 is not. Output the tree [[[[[6, 7], 0], 0], 0], 0] Case 4. Trees 1 through 6 are empty, but the leftward path in tree 7 has at least 4 nodes. So 7 = [[[[7a, 7b], 7c], 7d], 7e]. Output the tree [[[[[0, 7a], 7b], 7c], 7d], 7e]. Case 5. Otherwise, output tree 7.