https://www.geecoders.com/2021/09/permutations-prolog .html