Matches a word and letters given by user in the list of words present in a file