This is a faster version of How do I permute N elements of a list?.
The odds are very good that it spends more time printing
than permuting. Put in an if test around the print to print,
say, every 100 lines or so to see it really fly.

The reason that it is more efficient than the FAQ is that
it spends as little energy copying data as possible.