A class of nonlinear lossless dynamical systems