P293: Enumeration of all $k$-ary necklaces with fixed content of length $n$

P293: Enumeration of all $k$-ary necklaces with fixed content of length $n$
Input:
Two integer $k$ and $n$, and a content.
Output:
All $k$-ary necklaces with fixed content of length $n$.
Complexity:
Constant amortized time per solution.
Comment:
Reference:
[Sawada2003a] (Bibtex)