The exercise is the following :
Compute the Homology of the quotient space of $S^1 \times S^1$ obtained by identifying points in the circle $S^1\times \{x_0\}$ that differ by $2\pi/m$ rotation and identifying points in the circle $\{x_0\}\times S^1$ that differ by $2\pi/n$ rotation.
Now I thought I had come up with a solution for this exercise, but after looking for the answer online I found my result was wrong however I don't understand why.
My idea was to consider $S^1\times S^1$ and the sets $A_n$ and $A_m$ which are the points that differ by $2\pi/n$ and $2\pi/m$ respectively.
Now if we consider $\tilde X:=(S^1\times S^1)/ A_m$, then our desired space will be $X=\tilde X/A_n$.
Now first one needs to compute the homology of $\tilde X$, but since $A_m\rightarrow S^1\times S^1$ is a cofibration we have that $H_k(S^1\times S^1, A_m)\cong \tilde H(\tilde X)$. Using exact sequence of homology relative to a pair we find out a short exact sequence of the form
$0\rightarrow \mathbb{Z}\bigoplus \mathbb{Z}\rightarrow H_1(\tilde X)\rightarrow \mathbb{Z}^{m-1}\rightarrow 0$
which is a split short exact sequence , and so $H_1(\tilde X)\cong \mathbb{Z}^{m+1}$. Now doing something analogous for $\tilde X$ and $A_n$ I got that $H_1(X)=\mathbb{Z}^{n+m}$. However this result does not agree with what I found , but I am not sure what is wrong with me reasoning. Any help is appreciated. Thanks in advance.