For namenum, there are only one number and many dictionary words. Instead of using a dictionary, we can check if every word's number is the given number.