Permutations by nn

:fu P(a,n)
:if a:n>5|let@v=@v.a:a."\n"|el|let i=0|wh i<6|if stridx(a:a,i)<0|cal P(a:n?(a:a." ".i):i,a:n+1)|en|let i=i+1|endw|en
:endf
:ec P("",0)
i\x12=@v
\x1bZZ

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top