Added solution for problem 16.