According to aufbau principle, an electron enters the orbital of lowest energy first and subsequent electrons are fed in the order of increasing energies. The relative energies of various orbital in increasing order are: 1s,2s,2p,3s,3p,4s,3d,4p,5s,4d,5p,65,4f,5d,6p,7s