solved, brute force is apparently very fast