Solution (source code)

= Solution

The square gives one vertex, edges $a,b$, and one 2-cell attached by $aba^{-1}b$, hence $\pi_1(K)=\langle a,b\mid aba^{-1}=b^{-1}\rangle$. Based connected covers correspond contravariantly to <subgroups> of $\pi_1$. The <subgroup> $\langle a^2,b\rangle\simeq\mathbb Z^2$ gives the two-sheeted torus cover; $\langle b\rangle\simeq\mathbb Z$ gives an infinite cylindrical cover. If the total space is compact, fibres over a point are compact discrete and hence finite, so the <subgroup> has finite index. Conversely a finite-index cover has finitely many compact lifted cells and is compact.