Group theory — Lagrange's theorem does not seem to hold

The original $G$ is not a group:

$$5~\sharp~5 = 25 \mod 10 = 5$$

If $5$ had an inverse then by multiplying by $5^{-1}$ on both sides we get:

$$5=(5^{-1}~\sharp~5)~\sharp~5=5^{-1}~\sharp~(5~\sharp~5) = 5^{-1}~\sharp~5 = 1$$

Which is clearly not correct. Hence $5$ doesn't have an inverse in $G$.