I am trying to create a program that looks through all the permutations of a string and then prints out all the valid words. I can get all the permutations, but checking if