Suppose that the angles of triangle $ABC$ satisfy
\[\cos 3A + \cos 3B + \cos 3C = 1.\]Two sides of the triangle have lengths 10 and 13.  Find the maximum length of the third side.
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Suppose that the angles of triangle $ABC$ satisfy
\[\cos 3A + \cos 3B + \cos 3C = 1.\]Two sides of the triangle have lengths 10 and 13.  Find the maximum length of the third side.
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
\sqrt{399}
Suppose that the angles of triangle $ABC$ satisfy
\[\cos 3A + \cos 3B + \cos 3C = 1.\]Two sides of the triangle have lengths 10 and 13.  Find the maximum length of the third side.
train