Please help with this problem, Im stuck.

metric space (M,d)

Prove:

Given p $\displaystyle \in $ M, the set of points q such that there exists a $\displaystyle \epsilon $-chain joining p and q is both open and closed in M. Conclude that in a connected metric space, any two points can be $\displaystyle \epsilon $-chained to each other.