Choose the correct sentence which is built from the words and phrases given:
the / exam / begun / had / candidates / wrote / names / their / at / the / top / of /their / papers / the /. /,
A. The exam had begun, the candidates wrote their names at the top of their papers.
B. The exam had begun, the candidates their names wrote at the top of their papers.
C. The exam had begun, the candidates wrote their names the at top of their papers.
D. The exam had begun, their candidates wrote the names at the top of their papers.