Solution of the solar-neutrino problem