Cycle detection and removal in linked list

Here is my code
I think there is a problem in default input function that is build cycle list
Please check it

hi @hpant7563_8b950b13f3de9913 compilaton for this question doent work, try submitting and confirm