Calculating Cycles Lengths (At most Cycle Per Node)