Hausdorff spaces and continous functions on dense sets I have a problem with an exercise regarding the equivalence of the Hausdorff property with a statement about continuous functions on dense sets.

Let X be a topological space. Show that the following assertions are equivalent:
a) X is a Hausdorff space.
b) The diagonal $\Delta(X)=\{(x,y) \in X \times\ X: x=y \}$ is closed in $X \times \ X $.
c) For every space Z, every dense set D $\subset$ Z and every pair of maps $f_1, f_2: Z \to X$ one has $f_1=f_2$ if and only if $f_1|_D=f_2|_D$.
Additionally, show that the diagonal embedding $\Delta: X \to X \times \ X$ is continous.

I have proven that the diagonal embedding is continuous and that the implications a) $\Rightarrow$ b), b) $\Rightarrow$ c) hold. All I have left to do is to prove that c) $\Rightarrow$ a). This is my idea:
Suppose that $X$ is not a Hausdorff space. Then there are $x,y \in X, x \neq y$ such that for all open sets $O_x, O_y$ where $x \in O_x, y \in O_y$ we find $u \in O_x \cap O_y.\tag{1}\label{1}$ Now I wanted to define $$D=\{u \in X: u \,\rm satisfies\,\eqref{1} \}$$ and prove that $\bar{D}=X$ and define maps  $f_1, f_2: X \to X$ where $f_1, f_2$ are the identity on $D$ but do not agree on $X$, which would be a contradiction to c). The problem is that I got stuck with the proof that $\bar{D}=X$. I have to show that for $v \in X$ and every open set $O_v$ containing v I get $O_v \cap (D \setminus\{v\}) \neq \emptyset$, but I do not see how.
 A: The idea of going by contradiction is fine, but you need a small creative step (inspired by (b)) to abuse the power of assumption (c):
Suppose that $x$ and $y$ are distinct points that satisfy your $(1)$ or:
$$x \neq y \land \forall O,O' \subseteq X \text{ open }: (x \in O \land y \in O') \implies  O \cap O \neq \emptyset$$
so we cannot separate $x$ from $y$ by open sets.
Now consider $X \times X=X^2$ in the product topology, let $Z=\overline{D}$, where $D=\Delta(X)=\{(x,x)\in X^2: x \in X\}$ in the subspace topology. Let $f_1(x,y)=x$, restricted to $Z$, and $f_2(x,y)=y$, restricted to $Z$, be the (continuous) projections.
By construction $D$ is dense in $Z$ and $f_1$ and $f_2$ are the identity restricted on $D$, so coincide. The assumption $(1)$ says that $(x,y) \in Z\setminus D$ and $f_1(x,y) \neq f_2(x,y)$, contradicting (c).
A: $\left( c\right)\implies \left( a\right)$
First of all we suppose that $X$ is $T_1$, so each point of $X$ is closed. 
By contradiction, we suppose there exist two distinct points $x\neq y$ such that for each open neighborhood $U_x$ of $x$ and $U_y$ of $y$ it holds 
$U_x\cap U_y\neq \emptyset$
The point $y$ is closed so $U_x:=X\setminus \{y\}$ is an open neighborhood of $x$. We consider the space 
$Z:=X$ with the smallest topology for which the two following maps $f_1,f_2$ are continuos:
$f_1:=Id_X$ 
$f_2(z):= z$ if $z\in U_x$ and $f_2(y):=x$
It is simple to prove that $U_x$ is dense in $Z$, so $f_1=f_2$ because $f_1|_{U_x}=f_2|_{U_x}$. This means that 
$y=f_1(y)=f_2(y)=x$
that is a contradiction. 
So we must prove only that
$\left(c\right)\implies T_1$
We suppose by contradiction there exists a point $y$ that is not closed in $X$, so there exists $x\neq y$ in the closure of $\{y\}$, that means 
$U_x\cap \{y\}\neq \emptyset $
In other words
$y\in U_x$ 
for each open neighborhood $U_x$ of $x$. 
Now we can consider the Sierpinski space 
$Z=\{x,y\}$ with the following topology:
$\tau:=\{Z, \{y\}, \emptyset\}$
The two following maps are continuos:
$f_1(x):= x$ and $f_1(y)=y$;
$f_2\equiv y$
The second is clearly continuos, so we must prove only that $f_1$ is continuos:
Let $V$ be an open subset of $X$. If 
$V\cap \{x,y\}=\emptyset$ then 
$f_1^{-1}(V)=\emptyset$
If $x\in V$ then $V$ is an open neighborhood of $x$, so $y\in V$ and we have that 
$f^{-1}(V)=Z$
If  $x\not \in V$ and $y\in V$ then 
$f^{-1}(V)=\{y\}$ that is open in $Z$
So $f_1$ is continuos. Moreover we can observe that $D:=\{y\}$ is a dense set on $Z$ and $f_1|_{y}=f_2|_{y}$ so 
$f_1=f_2$ that implies 
$x=f_1(x)=f_2(x)=y$ 
