solves the word ladder puzzle