Codility cyclic_automorphisms Test