Homomorphism/map in both direction implies isomorphism/homeomorphism or not? I was working on a homework, and my first attempt get me to a deadend, but I was eventually able to solve it using a different method. But the fail attempt make me curious, and I wonder if it could have been fixed at all.
So I got 2 topological space $X$ and $Y$ with their first fundamental group being $G=\pi_{1}(X)$ and $H=\pi_{1}(Y)$. Additionally, there exist a continuous function from $X$ onto $Y$ and a continuous function from $Y$ onto $X$ (they are not necessary inverse of each other, and whether they are one-to-one is not known). These induce a homomorphism from $G$ into $H$ and a homomorphism from $H$ into $G$ (not known whether they are onto or not, or one-to-one or not).
So my questions are, given that, can you conclude:


*

*That $G\cong H$? If not, what is a counterexample?

*That $X\cong Y$? If not, what is a counterexample?

*If it is further known that both homomorphism are onto, can you then conclude that $G\cong H$? If not, what is a counterexample?
Thank you for your help.
 A: Suppose that the homomorphisms $G \to H$ and $H \to G$ are both onto.
Then, if the group $G$ is Hopfian, the composite of these maps is an isomorphism, and so each of them individually is
an isomorphism.
I don't think there is much more you can say in general.
A: This question shows that there can be continuous bijections both ways, but the spaces can still be non-homeomorphic. I'm not sure what happens the fundamental groups in that case; most of the examples linked to are not very nice from an algebraic topology point of view, and might have hard to compute or trivial (because they are very disconnected) groups. 
So we might expand that question: are there spaces with continuous bijections both ways, and non-isomorphic fundamental groups (which implies that they are non-homeomorphic a fortiori)? 
A: There is surely a simpler example, but consider the group $G$, which is the coproduct of countably many copies of $\Bbb{Z}$, and the group $H = G \times \Bbb{Z}/2 \Bbb{Z}$.
There are epimorphisms $G \to H$ (with kernel the subgroup $2 \Bbb{Z}$ of one of the factors) and $H \to G$ (with kernel $\Bbb{Z}/2\Bbb{Z}$), but $G$ and $H$ are not isomorphic, as $H$ has torsion, while $G$ is torsion free.
For an example with epimorphisms replaced with monomorphisms, consider the group $G_{1}$ which is the coproduct of countably many copies of $\Bbb{Z}/4\Bbb{Z}$, and $H_{1} = G \times \Bbb{Z}/2 \Bbb{Z}$. Actually, you can do epimorphisms as well with the latter example.
