Which of the following forces causes comets to regularly return to the inner solar system after being gone for many years?

A. friction
B. magnetism
C. electromagnetic force
D. gravity