循环判定

cycle criterion