For a complex number $z,$ find the minimum value of
\[|z - 3|^2 + |z - 5 + 2i|^2 + |z - 1 + i|^2.\]
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
For a complex number $z,$ find the minimum value of
\[|z - 3|^2 + |z - 5 + 2i|^2 + |z - 1 + i|^2.\]
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
10
For a complex number $z,$ find the minimum value of
\[|z - 3|^2 + |z - 5 + 2i|^2 + |z - 1 + i|^2.\]
train