Nonlinear inertial oscillations of a multilayer eddy: An analytical solution