U.S. stocks end sharply higher after inflation report, Nasdaq scores best quarter since 2020