Does this question even make sense?Prove that any infinte set with co-finite topology is connected.

Let $\displaystyle (X,T)$ be an infinite space with co-finite topology.

Let $\displaystyle (U,V)$ be a two point discrete space where $\displaystyle U=\{0,1\}$.

Let $\displaystyle f: X \rightarrow U$ be any continuous function.

I need to show that f is constant.

My big problem is this:

We know $\displaystyle f^{-1}(1)$ and $\displaystyle f^{-1}(0)$ are open.

Hence $\displaystyle f^{-1}(0), \ f^{-1}(1) \in T$.

However, $\displaystyle X-T$ is finite so there exist finitely many points $\displaystyle x_1, \ldots , x_n$ where$\displaystyle f(x_i) \neq 0$ or $\displaystyle 1$ where $\displaystyle i=1, \ldots , n$.

By that reasoning, we have a finite number of points where the function is not defined. These points are in $\displaystyle X$ so the function is discontinuous at each $\displaystyle x_i$.

Why is this right or wrong?