Nested Loop Problem 6