Failed to solve problem 12 (another brute force)