Untested brute force algorithm