Exact solution of the degenerate Anderson model