12. Given the sequence $\left\{a_{n}\right\}$ satisfies
$$
a_{1}=1, a_{2}=\frac{1}{2} \text {, }
$$

and $a_{n}\left(a_{n-1}+a_{n+1}\right)=2 a_{n+1} a_{n-1}(n \geqslant 2)$.
Then the 2012th term of the sequence $\left\{a_{n}\right\}$ is ( ).
(A) $\frac{1}{2010}$
(B) $\frac{1}{2011}$
(C) $\frac{1}{2012}$
(D) $\frac{1}{2013}$
12. C.
$$
\begin{array}{l}
\text { Given } a_{n}\left(a_{n-1}+a_{n+1}\right)=2 a_{n+1} a_{n-1} \\
\Rightarrow \frac{1}{a_{n+1}}+\frac{1}{a_{n-1}}=2 \cdot \frac{1}{a_{n}}(n \geqslant 2) .
\end{array}
$$

Then $\left\{\frac{1}{a_{n}}\right\}$ is an arithmetic sequence, and $\frac{1}{a_{1}}=1, d=1$. Therefore, $a_{n}=\frac{1}{n}$. Hence, the 2012th term is $\frac{1}{2012}$.