Solution (source code)

= Solution

A <transposition> exchanges exactly two letters and fixes the rest. A <permutation cycle> $(a_1\,a_2\,\ldots,a_k)$ sends each displayed letter to the next, sends $a_k$ to $a_1$, and fixes all other letters.

After imposing $\sigma(1)=2$, the remaining $n-1$ domain elements may be sent bijectively to the remaining $n-1$ values in arbitrary order. Hence the number is
$$
\boxed{(n-1)!}.
$$