Solution 12 improved

Brute force run time increased.