In my understanding, a number $i$ has an inverse $i^{-1}$ in $\mathbb Z_{n}$ if $i\times i^{-1} \equiv 1 \pmod{n}$
e.g.: In $\mathbb Z_{14}$ the inverse of $3$ is $5$ since $3\times5\equiv1\pmod{14}$
But what about in $\mathbb Z_{35}$? The inverse of $5$ is supposedly $29$ but $5\times29=145\equiv5\pmod{35}$ and not $1$
How do you actually find an inverse of $i$ in $\mathbb Z_{n}$?
edit: Oops, forget it, I just misread the question - it was meant to be $\mathbb Z_{36}$ in which case $145 \equiv 1 \pmod{36}$