If both the president and vice president are unable to fulfill their duties,who takes over as president?

A. President pro tempore of the Senate.
B. Secretary of state.
C. Speaker of the House.
D. Attorney general.