12. (16 points) Given a positive integer $n$ that satisfies the following condition: for each positive integer $m$ in the open interval $(0,2009)$, there always exists a positive integer $k$, such that
$$
\frac{m}{2009}<\frac{k}{n}<\frac{m+1}{2010} \text {. }
$$

Find the minimum value of such $n$.
12. Notice
$$
\begin{array}{l} 
\frac{m}{2009}2010 k
\end{array}\right. \\
\Rightarrow\left\{\begin{array}{l}
m n+1 \leqslant 2009 k, \\
m n+n-1 \geqslant 2010 k
\end{array}\right. \\
\Rightarrow 2009(m n+n-1) \geqslant 2009 \times 2010 k \\
\geqslant 2010(m n+1) \\
\Rightarrow 2009 m n+2009 n-2009 \\
\geqslant 2010 m n+2010 \\
\Rightarrow \geqslant \frac{4019}{2009-m} .
\end{array}
$$

Since the above inequality holds for every positive integer $m$ in the interval $(0,2009)$, we have
$$
n \geqslant \frac{4019}{2009-2008}=4019 \text {. }
$$

On the other hand, according to the inequality “$a, b, c, d \in \mathbf{R}_{+}$, $\frac{a}{b}<\frac{c}{d} \Rightarrow \frac{a}{b}<\frac{a+c}{b+d}<\frac{c}{d}$”, we know
$$
\frac{m}{2009}<\frac{m+(m+1)}{2009+2010}<\frac{m+1}{2010},
$$

which means $\frac{m}{2009}<\frac{2 m+1}{4019}<\frac{m+1}{2010}$
holds for every positive integer $m$ in the interval $(0,2009)$.
Therefore, the minimum value of $n$ is 4019.