Cyclic code debugged, all tests are passed.