Particle acceleration by a solar flare termination shock