You want to prove that is connected. Consider a continuous surjective map . Let be a separation of into 2 disjoint nonempty sets open in . Then and are disjoint sets whose union is . They are open and form a separation of . Contradiction.
The proof for this is very similar to what particlejohn suggested. Let and let G=X∪Y be a partition of G into open sets X and Y. Let and let . Then U, V are open and disjoint, and their union is A ... .