Please help with this problem, Im stuck.

metric space (M,d)

Prove:

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