the difference easy hard version constraintsthere n kid read unique book at end day ith kid book p_ith kid case p_i kid book it guarantee value p_i distinct integer 1 n ie p permutation the sequence p do not change day day fixedfor example n6 p4 6 1 3 5 2 end day book 1st kid belong 4th kid 2nd kid belong 6th kid at end second day book 1st kid belong 3th kid 2nd kid belong 2th kid onyour task determine number day book ith child return time 1 nConsider follow example p 5 1 2 4 3 the book 1st kid pass follow kid 1st day belong 5th kid 2nd day belong 3rd kid 3rd day belong 2nd kid 4th day belong 1st kid so fourth day book kid return owner the book fourth kid return time exactly dayyou answer q independent query