12. At a party, 9 celebrities performed $n$ "trio dance" programs. If in these programs, any two people have collaborated exactly once, then $n=$ $\qquad$
12.12.

Consider 9 people as 9 points. If two people have performed in the same group, then a line segment is drawn between the corresponding two points. Thus, every pair of points is connected, resulting in a total of 36 line segments. Each trio dance corresponds to a triangle, which has three sides. When all sides appear and are not reused, the total number of triangles is \( n = \frac{36}{3} = 12 \), i.e., 12 performances. Such 12 trio dances can be arranged, for example:
$$
\begin{array}{l}
(1,2,3),(4,5,6),(7,8,9) ;(1,4,7),(2,5,8),(3,6,9) ; \\
(1,5,9),(2,6,7),(3,4,8) ;(1,6,8),(2,4,9),(3,5,7)
\end{array}
$$