One Step at a Time: Combining LLMs and Static Analysis to Generate Next-Step Hints for Programming Tasks