Solution
= Solution
Write $r=(p-1)/2$, $O=1\cdot3\cdots(p-2)$ and $E=2\cdot4\cdots(p-1)$. The residues $p-2,p-4,\ldots,p-2r$ are exactly the odd factors of $O$, in reverse order. Hence
$$
O\equiv(-1)^rE\pmod p,
\qquad OE=(p-1)!\equiv-1\pmod p
$$
by <Wilson's theorem>. It follows that the <odd-residue squared product modulo a prime> is
$$
\boxed{1^2\cdot3^2\cdots(p-2)^2=O^2\equiv(-1)^{r+1}=(-1)^{(p+1)/2}\pmod p.}
$$
Thus it is $-1$ for $p\equiv1\pmod4$ and $1$ for $p\equiv3\pmod4$.