Let $G$ be a group. Construct a bijection from $\mathrm{Hom}(\mathbb{Z}_2,G)$ to $H:=\{g\in G:g^2=e\},$ where $\mathrm{Hom}(\mathbb{Z}_2,G)$ stands for the set of homomorphisms from $\mathbb{Z}_2$ to $G.$
Attempt. Let $f:\mathbb{Z}_2\to G$ a group homomorphism and we would like to map $f$ to an element $g$ of $G$ such that $g^2=e$ in a way such that the map is one to one and onto. The elements we have are $f(0)$ and $f(1)$ (here: $0$=set of even integers, $1$=set of odd integers), so a choice would be $f\mapsto f(0)$ (indeed, $f(0)^2=f(0^2)=f(0)=e$, since $f$ is homomorphism). But if $f(0)=h(0)$ for homomorphisms $f,\,h$, then I don't see how $f=h$ (also, if $g^2=e$, how do we get a homomorphism $f$ such that $f(0)=g$?). Maybe another map would do the work.
Thanks in advance.
I'll try to gather all comments and your attempt to an answer just for completion.
Let $W:Hom(\mathbb{Z}_2,G)\to H=\{g\in G| \ g^2=e\}$ with $W(f)=f(1)$. Then: