Solution of Problem #6