Define $P(\overline{abc}) = a^3+b^3+c^3$.

$\begin{array}{c}(P(352) & =& \overline{pqr} \\ P(\overline{pqr}) & = & \overline{klm} \\ P(\overline{klm}) & = & \overline{xyz} \end{array}$

Input $\overline{xyz}$.

Note: $p,q,r,k,l,m,x,y,z$ need not be distinct.