12. Given the sequence $\left\{a_{n}\right\}$ satisfies $a_{0}=\frac{1}{k}, a_{n}=a_{n-1}+\frac{1}{n^{2}} a_{n-1}^{2}$, where $k$ is a positive integer. If for all $n \in \mathbf{N}^{*}$, $a_{n}<1$, find the range of values for $k$.
For $a_{n}-a_{n-1}=\frac{1}{n^{2}} a_{n-1}^{2}>0 \Rightarrow$ the sequence $\left\{a_{n}\right\}$ is monotonically increasing.
$k=1$ when, $a_{0}=1, a_{1}=2$ does not meet the condition;
$k=2$ when, $a_{n}-a_{0}>\left[\frac{1}{n^{2}}+\frac{1}{(n-1)^{2}}+\cdots+\frac{1}{2^{2}}\right] a_{1}^{2}+a_{0}^{2}>\left(\frac{1}{2}-\frac{1}{n+1}\right) \cdot \frac{9}{16}+\frac{1}{4}$
$\Rightarrow a_{n}>\frac{9(n-1)}{32(n+1)}+\frac{3}{4}>1 \Rightarrow n>17$, does not meet the condition;
$k \geqslant 3$ when, $a_{n}-a_{n-1}=\frac{1}{n^{2}} a_{n-1}^{2}k-2+\frac{1}{n}>1 \Rightarrow a_{n}<1$, meets the condition.
In summary, the range of $k$ is $\left\{k \mid k \geqslant 3, k \in \mathbf{N}^{*}\right\}$.