if union of connected subsets are connected in a metric space, what if the union is the metric space $X$ itself?

With reference to this link that i read: Union of connected subsets is connected if intersection is nonempty

My question is: if union of connected subsets are connected in a metric space and their intersection is empty. Then what if the union is the metric space $X$ itself?

Namely: Let $X$ be a metric space, $X = \cup_{n=1}^{\infty}X_n$ where each $X_n$ is non empty connected and each $X_i$ and $X_j$ are not disjoint, show that $X$ is connected.

Can i use the same proof and idea as provided in the link? I have trouble mimicking when the collection of the connected subsets span the whole metric space instead of just being a subspace of $X$.

Define $B_n = \cup_{i=1}^n A_i$. Show all $B_n$ are connected by induction using the proof you linked to. Finally $X =\cup A_n = \cup B_n$ is connected as these sets are connected, all intersecting in $B_1 = A_1$, again using the same idea.
• Yes, sorry for the mistake! I have edited, i do mean not disjoint. i.e. $X_i \cap X_j \neq \emptyset$ for all $i,j$. – nan Nov 18 '17 at 17:15
Define the equivalence relation on $X$, such that for $x,y\in X$, $x\sim y$ if there are two connected subsets of $X$, namely $U$ and $V$, containing $x$ and $y$ respectively, so that $U\cap V\neq\phi$. Then the congruence classes will be disjoint connected subsets of $X$, whose union will be $X$.