If the letters of the word "master" are permitted in all possible ways and the words thus formed are arranged in dictionary order, then find the number of words that come before the word "they" in the list.