#!/usr/bin/env rakuusev6;
#| Print the kth permutation of the numbers from 1 to nmultisubMAIN( UInt \n, Int \kwhere { 1 <= k <= [*] 1..n } ) {
(1..n).permutations[k-1].join("").say;
}
multisubMAIN( *@ ) ishidden-from-USAGE {
say$*USAGE;
say"\nPlease ensure k is between 1 and n!";
}