// output of ./demo/comb/necklace-demo.cc:
// Description:
//% Generate all pre-necklaces, necklaces, and Lyndon words with a given number of colors.

arg 1: 4 == n  [length of strings >=1]  default=4
arg 2: 3 == m  [number of different beads >=2]  default=3
   1:  ....   1  N
   2:  ...1   4  N L
   3:  ...2   4  N L
   4:  ..11   4  N L
   5:  ..12   4  N L
   6:  ..21   4  N L
   7:  ..22   4  N L
   8:  .1.1   2  N
   9:  .1.2   4  N L
  10:  .111   4  N L
  11:  .112   4  N L
  12:  .121   4  N L
  13:  .122   4  N L
  14:  .2.2   2  N
  15:  .211   4  N L
  16:  .212   4  N L
  17:  .221   4  N L
  18:  .222   4  N L
  19:  1111   1  N
  20:  1112   4  N L
  21:  1122   4  N L
  22:  1212   2  N
  23:  1222   4  N L
  24:  2222   1  N
  # pre-necklaces = 32,  # necklaces = 24,  # Lyndon words = 18
