Artificial intelligent assistant

Closed subset of $\mathbb{R}^n$ and frontier Let $F$ be a closed subset of $\mathbb{R}^n$. Show that there exists $X \subset \mathbb{R}^n$ such that $\partial X = F$ (Frontier of $X$ is equal to $F$). Is this fact is true in general, i.e., for an arbitrary metric space $M$?

Considering the first nice answer of this question, for the general case of a metric space $M$, I think it suffices the $M$ to have at least two dense disjoint sets $A$ and $B$. The $A$ could play the role of $\mathbb{Q}^n$ and the other that of $\mathbb{R}^n\setminus\mathbb{Q}^n$ .The rest comes as I said like the first answer.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 821ee15e9515e586e3927ef7d255b8d3