Impossible - the only way to do it would be to have a complete list of all the valid words for each category, and as the cache allows foreign words it would also need to be for every possible language. It also allows various names of things (buildings, boys name, maiden names) which again would be impossible to enumerate. I'm afraid you'll just have to manually work out the challenge.