Morse Multiple Matches (dynamic programming) not working :(