If $z^{13} = 1,$ then $z^{13} - 1 = 0,$ which factors as
\[(z - 1)(z^{12} + z^{11} + \dots + z + 1) = 0.\]If $z = 1,$ then $z + z^3 + z^4 + z^9 + z^{10} + z^{12} = 6.$

Otherwise, $z^{12} + z^{11} + \dots + z + 1 = 0.$  Let
\begin{align*}
a &= z + z^3 + z^4 + z^9 + z^{10} + z^{12}, \\
b &= z^2 + z^5 + z^6 + z^7 + z^8 + z^{11}.
\end{align*}Then
\[a + b = (z + z^3 + z^4 + z^9 + z^{10} + z^{12}) + (z^2 + z^5 + z^6 + z^7 + z^8 + z^{11}) = -1.\]Also,
\begin{align*}
ab &= (z + z^3 + z^4 + z^9 + z^{10} + z^{12})(z^2 + z^5 + z^6 + z^7 + z^8 + z^{11}) \\
&= z^3 + z^6 + z^7 + z^8 + z^9 + z^{12} \\
&\quad + z^5 + z^8 + z^9 + z^{10} + z^{11} + z^{14} \\
&\quad + z^6 + z^9 + z^{10} + z^{11} + z^{12} + z^{15} \\
&\quad + z^{11} + z^{14} + z^{15} + z^{16} + z^{17} + z^{20} \\
&\quad + z^{12} + z^{15} + z^{16} + z^{17} + z^{18} + z^{21} \\
&\quad + z^{14} + z^{17} + z^{18} + z^{19} + z^{20} + z^{23} \\
&= z^3 + z^6 + z^7 + z^8 + z^9 + z^{12} \\
&\quad + z^5 + z^8 + z^9 + z^{10} + z^{11} + z \\
&\quad + z^6 + z^9 + z^{10} + z^{11} + z^{12} + z^2 \\
&\quad + z^{11} + z + z^2 + z^3 + z^4 + z^7 \\
&\quad + z^{12} + z^2 + z^3 + z^4 + z^5 + z^8 \\
&\quad + z + z^4 + z^5 + z^6 + z^7 + z^{10} \\
&= 3z + 3z^2 + 3z^3 + 3z^4 + 3z^5 + 3z^6 + 3z^7 + 3z^8 + 3z^9 + 3z^{10} + 3z^{11} + 3z^{12} \\
&= -3.
\end{align*}Then by Vieta's formulas, $a$ and $b$ are the roots of $w^2 + w - 3 = 0.$  By the quadratic formula,
\[w = \frac{-1 \pm \sqrt{13}}{2}.\]Hence, the possible values of $z + z^3 + z^4 + z^9 + z^{10} + z^{12}$ are 6, $\frac{-1 + \sqrt{13}}{2},$ and $\frac{-1 - \sqrt{13}}{2},$ so
\[w_1^2 + w_2^2 + w_3^2 = 6^2 + \left( \frac{-1 + \sqrt{13}}{2} \right)^2 + \left( \frac{-1 - \sqrt{13}}{2} \right)^2 = 43.\]
z^{13} = 1,$이면 $z^{13} - 1 = 0,$ 은 다음과 같이 계산됩니다.
\[(z - 1)(z^{12} + z^{11} + \점 + z + 1) = 0.\]$z = 1,$이면 $z + z^3 + z^4 + z^9 + z^{10} + z^{12} = 6.$

그렇지 않으면 $z^{12} + z^{11} + \점 + z + 1 = 0.$ 입니다.
\begin{align*}
a &= z + z^3 + z^4 + z^9 + z^{10} + z^{12}, \\
b &= z^2 + z^5 + z^6 + z^7 + z^8 + z^{11}.
\end{align*}그렇다면
\[a + b = (z + z^3 + z^4 + z^9 + z^{10} + z^{12}) + (z^2 + z^5 + z^6 + z^7 + z^8 + z^{11}) = -1.\]도 있습니다,
\begin{align*}
ab &= (z + z^3 + z^4 + z^9 + z^{10} + z^{12})(z^2 + z^5 + z^6 + z^7 + z^8 + z^{11}) \\.
&= z^3 + z^6 + z^7 + z^8 + z^9 + z^{12} \\
&\쿼드 + z^5 + z^8 + z^9 + z^{10} + z^{11} + z^{14} \\
&\쿼드 + z^6 + z^9 + z^{10} + z^{11} + z^{12} + z^{15} \\
&\쿼드 + z^{11} + z^{14} + z^{15} + z^{16} + z^{17} + z^{20} \\
&\쿼드 + z^{12} + z^{15} + z^{16} + z^{17} + z^{18} + z^{21} \\
&\쿼드 + z^{14} + z^{17} + z^{18} + z^{19} + z^{20} + z^{23} \\
&= z^3 + z^6 + z^7 + z^8 + z^9 + z^{12} \\
&\쿼드 + z^5 + z^8 + z^9 + z^{10} + z^{11} + z \\
&\쿼드 + z^6 + z^9 + z^{10} + z^{11} + z^{12} + z^2 \\
&\쿼드 + z^{11} + z + z^2 + z^3 + z^4 + z^7 \\
&\쿼드 + z^{12} + z^2 + z^3 + z^4 + z^5 + z^8 \\
&\quad + z + z^4 + z^5 + z^6 + z^7 + z^{10} \\
&= 3z + 3z^2 + 3z^3 + 3z^4 + 3z^5 + 3z^6 + 3z^7 + 3z^8 + 3z^9 + 3z^{10} + 3z^{11} + 3z^{12} \\
&= -3.
\end{align*}그런 다음 Vieta의 공식에 의해 $a$와 $b$는 이차 공식에 의해 $w^2 + w - 3 = 0.$의 근이 됩니다,
\[w = \frac{-1 \pm \sqrt{13}}{2}.\]따라서 $z + z^3 + z^4 + z^9 + z^{10}$의 가능한 값은 다음과 같습니다. + z^{12}$ 의 가능한 값은 6, $\frac{-1 + \sqrt{13}}{2},$ 및 $\frac{-1 - \sqrt{13}}{2},$ 이므로 다음과 같습니다.
\[w_1^2 + w_2^2 + w_3^2 = 6^2 + \left( \frac{-1 + \sqrt{13}}{2} \right)^2 + \left( \frac{-1 - \sqrt{13}}{2} \right)^2 = 43.\]