Solution for problem 27
Solution for problem 28
Solution for problem 29
Solution for problem 30
Solution for problem 31
Solution for problem 32

Also export permutations function from problem 24 to an additional file, since it is used more often