Thomas and I have run through the algorithm together, and I am convinced that it works with random order of tees. I'm sort of convinced that the function always terminates, but since the `break` in the inner loop lets the outer loop continue to run, that seems like a potential problem (or is it intended?). I would suggest using `return` instead of `break`, as it doesn't seem like more work needs to be done after the recursive call returns.