2- How to detect the starting point of the loop in Question-1 ?