12. (20 points) Find all triples of distinct positive odd integers $\{a, b, c\}$, such that $a^{2}+b^{2}+c^{2}=2019$.


12. By symmetry, without loss of generality, let $aa^{2}+b^{2}+c^{2}=2019$, then
$c^{2}>667$.
Note that, $c$ is not a multiple of 3.
Thus, $c \geqslant 29$.
Therefore, $c \in\{29,31,35,37,41,43\}$.
In fact, if an odd number $N=x^{2}+y^{2}$ is the sum of the squares of two positive integers, then the even number $2 N$ can definitely be expressed as the sum of the squares of two distinct positive odd numbers. This is because
$$
2 N=2\left(x^{2}+y^{2}\right)=(x-y)^{2}+(x+y)^{2} \text {. }
$$

If $c=43$, the equation becomes
$$
\begin{array}{l}
a^{2}+b^{2}=170=2 \times 85 \\
=2\left(6^{2}+7^{2}\right)=2\left(2^{2}+9^{2}\right),
\end{array}
$$

then $170=1^{2}+13^{2}=7^{2}+11^{2}$.
Thus, we get
$$
\{a, b, c\}=\{1,13,43\},\{7,11,43\} \text {. }
$$

If $c=41$, the equation becomes
$$
\begin{array}{l}
a^{2}+b^{2}=338=2 \times 13^{2} \\
=2\left(5^{2}+12^{2}\right)=7^{2}+17^{2} .
\end{array}
$$

Thus, we get $\{a, b, c\}=\{7,17,41\}$.
If $c=37$, the equation becomes
$$
\begin{array}{l}
a^{2}+b^{2}=650=2 \times 13 \times 5^{2} \\
=2\left(2^{2}+3^{2}\right)\left(3^{2}+4^{2}\right)=2\left(1^{2}+18^{2}\right) \\
=2\left(6^{2}+17^{2}\right)=2\left(10^{2}+15^{2}\right),
\end{array}
$$

then $650=17^{2}+19^{2}=11^{2}+23^{2}=5^{2}+25^{2}$. The sum is less than 10000 yuan, at this time, the number of 10 yuan notes is more than 1000, which is a contradiction.