Artificial intelligent assistant

Product of all elements of a finite group with an unique element of order 2 I have the following problem from Aluffi's Algebra: given a finite group $G$ with an unique element $f$ of order $2$, show that \begin{equation} \prod_{g\in G}g=f \end{equation} My reasoning is the following. Since $f$ is the unique element of order $2$, for each $g\in G$ such that $g\neq e$ and $g\neq f$, it must be that $g^{-1}\neq g$. So we can concoct a particular product coupling the elements with their inverses: \begin{equation} e\cdot f\cdot (g_1\cdot g_1^{-1})\cdot(g_2\cdot g_2^{-1})\cdots (g_n\cdot g_n^{-1}) \end{equation} which is really just $f$ in the end. My question is: how can I show that the order of the factors in this product really does not matter? I cannot see a way out.

If the group is not abelian, the expression $$\prod_{g\in G} g$$ makes no sense. (It makes no sense at all if the group is infinite, but I assume that it isn't...)

Indeed, take any elements $x,y\in G$ such that $xy\
eq yx$ and call the other elements $$g_1,g_2,\ldots,g_r$$ Then, $$g_1g_2\cdots g_rxy\
eq g_1g_2\cdots g_ryx$$ so the product of the elements of $G$ depends on the chosen order.

So I think that there are two possibilities: perhaps you must assume that the prod expression makes sense, and you must show that, then, the group must be abelian (as I have just done), or the problem is wrongly set out.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy df5945ff67a96c89ff1ff054e44c54fb