The hint to the problem is to consider homomorphism $S_2 \rightarrow S_3 \rightarrow S_2$
I found this answer by Arturo Magidin here Why is there no functor $\mathsf{Group}\to\mathsf{AbGroup}$ sending groups to their centers?
Consider for example $G=C_2$, $H=S_3$, $K=C_2$, and the maps $f\colon G\to H$ sending the nontrivial element of $G$ to $(1,2)$, and $g\colon H\to K$ by viewing $S_3/A_3$ as the cyclic group of order $2$.
Since $Z(G) = Z(K) = C_2$, and $Z(H) = \{1\}$, such a putative functor $\mathcal{F}$ would give that $\mathcal{F}(f)\colon C_2\to\{1\}$ is the zero map $\mathbf{z}$, and $\mathcal{F}(g)\colon \{1\}\to C_2$ is the inclusion of the trivial group into $C_2$. But $g\circ f=\mathrm{id}_{C_2}$, so $$\mathrm{id}_{C_2} = \mathcal{F}(\mathrm{id}_{C_2}) = \mathcal{F}(gf) = \mathcal{F}(g)\mathcal{F}(f) = \mathbf{z}$$ where $\mathbf{z}\colon C_2\to C_2$ is the zero map.
Thus, no such functor $\mathcal{F}$ can exist.
but there are several things I don't understand. I guess $S_2=C_2$?
What does the author mean with "viewing $S_3/A_3$ as the cyclic group of order $2$" ? Can you explain what the element of that quotient are and why and how is that related to the cyclic group of order 2? and why can you use it instead of S_3 as the hint suggests?
Is $C_2$ the same as $S_2$?
why is the map $C_2 \to \{1\} $ the zero map ? The image is not 0 as in https://mathworld.wolfram.com/ZeroMap.html
why is $g\circ f: C_2 \rightarrow C_2 = id_{C_2}$? Just because a map has the same domain and codomain it does not mean it is the identity.
why is $Z(H)=\{1\}$, i.e why the other elements of H don't conmute?
Hope someone can clear up these points. Many thanks
Edit:
$ g\circ f:S_2 \rightarrow S_3 \rightarrow S_2$
$(1,2) \mapsto (1,2) \mapsto (1,2)$
$ e \mapsto e \mapsto ?$
$? \mapsto (1,3) \mapsto ? $
$ ? \mapsto (2,3)\mapsto ?$
$ ? \mapsto (1 2 3)\mapsto ?$
$ ? \mapsto (1 3 2)\mapsto ?$