A single solution to the atmospheric and solar neutrino anomalies