Solution for problem 33.
Solution for problem 33