Corrected my mistake but still failing last test-case

image
here u are printing cnt but actually u need to print value of iterator.
also the condition is not correct.
it should be
if(cnt==n) then print *it