Implement function to find beginning of cyclic list