brute force greedy