(A+B+C)^3
=A^3+3A(B+C)^2+3A^2(B+C)+(B+C)^3
=A^3+3A(B^2+2BC+C^2)+3A^2B+3A^2C+B^3+3B^2C+3BC^2+C^3
=A^3+B^3+C^3+3A^2B+3A^2C+3B^2A+3B^2C+3C^2A+3C^2B+6ABC
(A+B+C)^3
=A^3+3A(B+C)^2+3A^2(B+C)+(B+C)^3
=A^3+3A(B^2+2BC+C^2)+3A^2B+3A^2C+B^3+3B^2C+3BC^2+C^3
=A^3+B^3+C^3+3A^2B+3A^2C+3B^2A+3B^2C+3C^2A+3C^2B+6ABC