12. Let vector $\overrightarrow{a_{1}}=(1,5), \overrightarrow{a_{2}}=(4,-1), \overrightarrow{a_{3}}=(2,1), \lambda_{1}, \lambda_{2}, \lambda_{3}$ be non-negative real numbers, $\lambda_{1}+\frac{\lambda_{2}}{2}+\frac{\lambda_{3}}{3}=1$, then the minimum value of $\left|\lambda_{1} \overrightarrow{a_{1}}+\lambda_{2} \overrightarrow{a_{2}}+\lambda_{3} \overrightarrow{a_{3}}\right|$ is $\qquad$.
Let $p_{1}=\lambda_{1}, p_{2}=\frac{\lambda_{2}}{2}, p_{3}=\frac{\lambda_{3}}{3}, \overrightarrow{O A}=\overrightarrow{a_{1}}=(1,5), \overrightarrow{O B}=2 \overrightarrow{a_{2}}=(8,-2), \overrightarrow{O C}=3 \overrightarrow{a_{3}}=(6,3)$, then $\lambda_{1} \overrightarrow{a_{1}}+\lambda_{2} \overrightarrow{a_{2}}+\lambda_{3} \overrightarrow{a_{3}}=\lambda_{1} \overrightarrow{a_{1}}+\frac{\lambda_{2}}{2} \cdot 2 \overrightarrow{a_{2}}+\frac{\lambda_{3}}{3} \cdot 3 \overrightarrow{a_{3}}=p_{1} \overrightarrow{O A}+p_{2} \overrightarrow{O B}+p_{3} \overrightarrow{O C}$, and $p_{1}+p_{2}+p_{3}=1$.
As shown in the figure, $\overrightarrow{O P}=p_{1} \overrightarrow{O A}+p_{2} \overrightarrow{O B}+\left(1-p_{1}-p_{2}\right) \overrightarrow{O C}$ $=p_{1} \overrightarrow{C A}+p_{2} \overrightarrow{C B}+\overrightarrow{O C} \Rightarrow \overrightarrow{C P}=p_{1} \overrightarrow{C A}+p_{2} \overrightarrow{C B}$, since $0 \leqslant p_{1}+p_{2} \leqslant 1$, point $P$ is inside or on the boundary of $\triangle A B C$. When $P$ coincides with point $M$, $|\overrightarrow{O P}|$ achieves its minimum value. Noting that the line $A B: x+y=6$, the minimum value of $\left|\lambda_{1} \overrightarrow{a_{1}}+\lambda_{2} \overrightarrow{a_{2}}+\lambda_{3} \overrightarrow{a_{3}}\right|$ is $d=\frac{6}{\sqrt{2}}=3 \sqrt{2}$.