Word Quest Algorithm Implemented