brute force problem 1