Brute force solution