$B \equiv 1$ or $-1$ (mod n) where $B$ is the product of the elements of $U_n$. How to prove the product of the elements of $U_n$ , $B$is congruent to $1$ or $-1$.
$U_n$ is the set of all positive numbers less than and relatively prime to $n$.
We have to prove $B \equiv 1$ (mod n) where  $B$ is the product of the elements of $U_n$.
My Attempt:   We can see the statement is true for $n = 1 , 2$.
The number of elements of $U_n$  will be  even for all natural number $n> 3$ as $\phi(n)$  is an even number for all natural number $n \geq 3$.
So we will get odd number of elements of order $2$ for each group of order $n(\geq 3)$.
$B = b_1 b_2 ... b_k$  where $b_i \in U_n$  and $b_i$ is of order $2$ and $k$  is an odd number for all$n \geq 3$.
Now it remains to prove this product is congruent to $1$ or $-1$ mod n.
Can anyone please help me ?
 A: Lemma Let $A$ be a multiplicatively notated finite elementary abelian group of order $2^k$, $k \in \mathbb{N}_{\gt 1}$. Then $\underset{a \in A}\prod a=1$. 
Proof Regard $A$ as a $k$-dimensional vectorspace over the field of two elements $\mathbb{F}_2=\{0, 1\}$. Write 0 for the zero vector and 1 for the vector $(1,1, \cdots, 1)$ ($k$-coordinates). With each $v \in A$ we associate the vector 1 $− v$, when
summing all vectors, i.e. all elements of $A$. Since there are $2^{k−1}$ such pairs, the sum
equals $2^{k−1} \cdot $ 1 $\equiv$ 0 (mod $2$).
Corollary Let $A$ a multiplicatively notated finite abelian group and let $x=\underset{a \in A}\prod a$. Then $x=1$, unless the subgroup of all involutions, $I=\{a \in A: a^2=1\} \cong C_2$ in which case $x$ is the unique element of order $2$. 
Proof $\underset{a \in A}\prod a=\underset{a \in I}\prod a \cdot \underset{a \notin I}\prod a$. If $a \notin I$, then $a \neq a^{-1}$, so $\underset{a \notin I}\prod a=1$, Now apply Lemma to $I$ and the proof is complete.
Note The corollary can be restated as follows: let $A$ be a finite abelian group and $P \in Syl_2(A)$, then the product $x$ of all elements of $A$ is $1$ if $P$ is trivial or non-cyclic, and if $P$ is non-trivial cyclic, $x$ equals the unique element of order $2$ of $A$.
