Getting WA in Permutation Cycles

This is the problem link . I have used DSU in my solution cant figure out what I m missing.
Please tell me whats wrong in my code . Here is my submission link

https://www.codechef.com/viewsolution/38151273

I have fixed it . Ignore :slight_smile: