Energy pushes US inflation up sharply in July