[hard] #152 - bruteforce solution