Nonlinear resonant interaction of three longitudinal waves in a magnetized plasma