Sherlock and Permutations