A search algorithm for a popular word game