Let M be a closed connected 3-manifold, and write H1(M;Z) as Zr⊕F, the direct sum of a free abelian group of rank r and a finite group F. Show that H2(M;Z) is Zr if M is orientable and Zr−1⊕Z2 if M is nonorientable. In particular, r≥1 when M is nonorientable. Using Exercise 6, construct examples showing there are no other restrictions on the homology groups of closed 3-manifolds. [In the nonorientable case consider the manifold N obtained from S2×I by identifying S2×{0} with S2×{1} via a reflection of S2.]