Magnesium (Mg) has an atomic number of 12. What is the ground-state electron configuration of magnesium?

A. 1s21p62s22p2
B. 1s21p61d4
C. 1s22s22p63s2
D. 1s22s22p62d2