The first input has 9 possible outputs
The second input has 8 possible outputs
…
The seventh input has 3 possible outputs
$ 9 \cdot 8 \cdot 7 \cdot 6 \cdot 5 \cdot 4 \cdot 3 $
$ \frac{9!}{2!} $