2. Batman wants to crack Edward Nigma's code. He knows that the code represents some permutation of the letters in the expression TRICKORTREAT, and that the first and last letters of the code are the same. How many possibilities are there for such a code?
2. Notice that the letters T and R in the sought-after cipher appear three times each, while all the remaining letters appear once. Therefore, since the first and last letter must be the same, according to the problem, it must be one of the letters T or R. Let's assume the cipher starts and ends with the letter T. Then, within the cipher, there remain a total of 10 letters, among which $R$ appears three times and the remaining letters appear once; thus, they can be permuted in $\frac{10!}{3!}$ ways, which is the total number of possible ciphers that start and end with T. If the cipher starts with the letter R, the calculation is completely analogous, and in that case, we get the same number of possibilities. Therefore, there are $2 \cdot \frac{10!}{3!}=\frac{10!}{3}$ possibilities that Batman needs to try.