You nailed space (b). So I'll talk about space (a), which we will denote by $A$.
Space (a) is connected, arcwise connected and semi-locally simply connected. Hence, it has a universal cover. It is natural to try to find out that universal cover. With some thinking, we get that the universal cover is the "Happy Beads" (for the lack of a good non-pornographic word) depicted below:

where the projection map is quite obvious. Now what follows is simply a mere adaptation of the proof that $\pi_1(S^1)=\mathbb{Z}$, which we outline below:
Fix a point $y$ in the universal cover and consider the map $HB: \pi_1(A, x_0) \rightarrow \mathbb{Z}$, where $x_0$ is the upper point of the sphere (which has a segment going down), which takes a class $[f]$ and sends it to $n$, where $n$ is the number of spheres (counted with "direction") between the initial point of the lift of $f$ (which is $y$) and the endpoint. This is well-defined due to the properties of lifts. $HB$ is obviously surjective. Now, if the $n$ associated with a given class is $0$, then the lifted path is a loop in the universal cover. Hence, homotopically trivial. Therefore, we have that $[f]=p_{\#}[Lift ~f]=p_{\#}0=0$. We then have that $HB$ is an isomorphism.