Added solution for Problem 49