Question 166
Let $S=\{1, \ldots, n\}$, with $n \geqslant 3$ an integer, and let $k$ be a strictly positive integer. Denote by $S^{k}$ the set of $k$-tuples of elements of $S$. Let $f: S^{k} \rightarrow S$ be such that, if $x=\left(x_{1}, \ldots, x_{k}\right) \in S^{k}$ and $y=\left(y_{1}, \ldots, y_{k}\right) \in S^{k}$ with $x_{i} \neq y_{i}$ for all $1 \leqslant i \leqslant k$, then $f(x) \neq f(y)$.
Prove that there exist $\ell$ with $1 \leqslant \ell \leqslant k$ and a function $g: S \rightarrow S$ satisfying, for all $x_{1}, \ldots, x_{k} \in S$, $f\left(x_{1}, \ldots, x_{k}\right)=g\left(x_{\ell}\right)$.
Prove that there exist $\ell$ with $1 \leqslant \ell \leqslant k$ and a function $g: S \rightarrow S$ satisfying, for all $x_{1}, \ldots, x_{k} \in S$, $f\left(x_{1}, \ldots, x_{k}\right)=g\left(x_{\ell}\right)$.