implemented bruteforce approach for Problem4