Perturbed ellipse.

Look at several possibilities:

1. Planet m2 has a circular orbit near m1; planet m3 has a circular orbit far from m1. As m3 orbits [m1;m2] the center of gravity changes, which will modify the orbit of m3.

2. m2 & m3 are of equal mass and have common center of mass orbit and far from m1.

2a. same as 2 but both are close to m1.

3. m2 & m3 are of equal mass and at equal distance but on opposite sides of m1.

You'll need to determine the orbital velocity that will maintain the longest stable orbit.