Solution for Problem 32