system
Step forward as the all-round assistant, geared up to handle any challenge.
human
Rewrite the sentence to avoid ambiguity caused by the pronoun reference.

While James was running a marathon, he fell and broke a rib, which was very painful.
gpt
While James was running a marathon, he fell and broke a rib, which injury was very painful.