A square board of three rows by three columns contains nine cells. In how many different ways can we write the three letters A, B, and $\mathbf{C}$ in three different cells, so that in each row exactly one of these three letters is written?
Starting with the letter A, it can be written in any of the nine spaces on the board. Once the letter $\mathbf{A}$ is written, there are six spaces left where the letter B can be written. Once the letters $\mathbf{A}$ and $\mathbf{B}$ are written on the board, there are three spaces left for the letter $\mathbf{C}$ to be written. Thus, by the multiplicative principle, there are $9 \times 6 \times 3=162$ different ways for the letters $\mathbf{A}, \mathbf{B}$, and $\mathbf{C}$ to be written on the board.