Solution (source code)

= Solution

Every path can change sheets only by applying the two reflections
$$
R_-(w)=-\pi-w,
\qquad
R_+(w)=\pi-w.
$$
Their products satisfy
$$
R_+R_-(w)=w+2\pi,
\qquad
R_-R_+(w)=w-2\pi.
$$
Thus an even number of reflections gives a translation by an integral multiple of $2\pi$, while an odd number gives a translated reflection. All possible values are therefore
$$
\boxed{2n\pi+G(z)
\quad\hbox{and}\quad
(2n+1)\pi-G(z),\qquad n\in\mathbb Z,}
$$
in agreement with the <branches of the complex inverse sine>.