Solution (source code)

= Solution

The map $p$ is the quotient of $\mathbb R^2$ by integer translations, and
$$
p^{-1}(x_0)=\mathbb Z^2.
$$
Given a <based loop> $\gamma$ at $x_0$, the <path lifting theorem> gives a unique lift $\widetilde\gamma$ beginning at $0$. Its endpoint lies in $\mathbb Z^2$. The <homotopy lifting property> shows that this endpoint depends only on $[\gamma]$, so define
$$
\Phi:\pi_1(X,x_0)\to\mathbb Z^2,
\qquad
\Phi([\gamma])=\widetilde\gamma(1).
$$
Lifting a concatenation after translating the second lift by the endpoint of the first shows that $\Phi$ is a <group homomorphism>. It is surjective because, for every $m\in\mathbb Z^2$, the path $r\mapsto p(rm)$ is a loop whose lift ends at $m$. If a lift ends at zero, it is a loop in the simply connected space $\mathbb R^2$ and contracts there; projecting the contraction proves that its original loop is null-homotopic. Thus $\Phi$ is injective, and the <lift-endpoint description of the fundamental group of the torus> gives
$$
\boxed{\pi_1(X,x_0)\cong\mathbb Z^2}.
$$