pub fn perm(n: u64, s: &str) -> String
Return the nth (0-based) permutation of the input string. Example: perm(3, “abc”) -> “bac”.