brute force problem 6