5.2.4.15 Various problems on the plane
(3) An arbitrary point \( M \) is taken inside the triangle \( A B C \). Find the perimeter of a triangle with vertices at the centroids of triangles \( A B M, B C M \) and \( A C M \), if the perimeter of the triangle \( A B C \) is equal to \( 2 p \).