figured out the algorithm, all you have to do is reverse the possible word string and you'll be done