Inverse Spectral Problem Related to the N-wave Equation