Hatcher 2.1 problem 19 - homology of square boundary plus interior points with first coordinate rational I need help verifying and completing my solution to problem 2.1.19 of Hatcher's book Algebraic Topology.

Calculate the homology groups of the subspace of $I \times I$ consisting of its 4 boundary edges and all the points in its interior with rational first coordinate. 

Here is my partial solution: Let $X$ be the given space, let $Y$ be the top and bottom edge, and let $Z = I \cap \mathbb{Q}$. We have $H_k(Y) = 0$ for $k > 0$, so $H_k(X) \approx H_k(X, Y)$ for $k>1$ using the long exact sequence for the pair $(X, Y)$. Note that $(X, Y)$ is a good pair (i.e. $Y$ is a deformation retract of a neighbourhood in $X$), and $X/Y$ is the suspension $SZ$. Therefore, $H_{k+1}(X, Y) \approx \widetilde H_{k+1}(X/Y) \approx \widetilde{H}_k(Z)$, using the relationship between the homology of a space and the homology of its suspension. This gives $H_{k+1}(X) \approx \widetilde{H}_k(Z)$ for $k>0$. The latter is $0$ since $Z$ is totally disconnected, so $X$ has trivial homology in dimensions 2 and above. I don't see an easy way to continue for dimension $1$. Any hints would be appreciated. 
 A: This space can be described as
$$
X = \{(x,y) \in I \times I : x \in \mathbb{Q}\}.
$$
Take $A = \{(x,y) \in X : y < 3/4 \}$ and $B = \{(x,y)  \in X : y > 1/2\}$ open sets. The lower and upper edges of $I \times I$ are deformation retracts of $A$ and $B$ respectively, so both $A$ and $B$ are contractible. Their intersection is
$$
A \cap B  = \{(x,y) \in X : x \in \mathbb{Q} , y \in (1/2,3/4) \} \simeq I \cap \mathbb{Q},
$$
the homotopy given by collapsing each interval to its midpoint. In particular we see that $$H_k(A \cap B) \simeq \bigoplus_{q \in I \cap \mathbb{Q}} H_k(\{q\})$$ for each $k$. Since a point is trivially contractible, the intersection has trivial homology for positive degrees and $H_0(A \cap B) \simeq \mathbb{Z}^{(\mathbb{N})}$.
Thus, using Mayer-Vietoris we have the following exact sequence of reduced homology:
$$
0 \to \widetilde{H}_1(X) \to \widetilde{H}_0(A \cap B) \to \widetilde{H}_0(A) \oplus \widetilde{H}_0(B) \to \widetilde{H}_0(X)\ \to 0.
$$ 
Since both $A$, $B$ and $X$ are path connected their (reduced) homology at degree zero vanishes, so
$$
\widetilde{H}_1(X) \simeq \widetilde{H}_0(A \cap B) \simeq \mathbb{Z}^{(\mathbb{N})} 
$$
and thus $H_1(X) \simeq \mathbb{Z}^{(\mathbb{N})}$.
A: I think Guido A.'s answer is most elegant, but also your approach can be made working.
Let us first observe that if $(X,A)$ is a good pair with a contractible $A$, then the projection $q : X \to X/A$ induces isomorpisms $q_* : H_k(X) \to H_k(X/A)$ for all $k$. This follows from Hatcher's Proposition 2.22. Just consider the long exact sequences of the pairs $(X,A)$ and $(X/A,A/A)$ which are connected "levelwise" by the induced maps $q_* : H_k(A) \to H_k(A/A)$ (which are isomorphisms), $q_* : H_k(X) \to H_k(X/A)$ and $q_* : H_k(X,A) \to H_k(X/A,A/A)$ (which are isomorphisms). Now the Five Lemma applies.
Let $B$ and $T$ the bottom and top edges of $X$, respectively. They are contractible. Consider the quotient maps $p : X \to X/B$ and $q : X/B \to (X/B)/T = S Z$. Both $(X,B)$ and $(X/B,T)$ are good pairs. Now the above result applies to show that $q \circ p : X \to S Z$ induces isomorphisms in homology.
But then we can use $\tilde{H}_{k+1}(S Z) \approx \tilde{H}_k(Z)$.
