1st attempt, failed for connecting left-most child to the right-most one
change to iteration
sol of q117
sol of q116