On the table...

The energy level overlap for a many-electron atom has begun and if you follow the periodic table closely you will not miss it. Although the elements 21-30 are in the fourth period or row of the table, they are labeled as "3d". Once you hit element 31, the energy level reverts to n=4 and you are filling 4p orbitals.

Examples    More examples    Still more examples.....

One last thing: the configurations we have been writing are ideal. As early on as elements like chromium and copper there are anomalies in the regular electron configurations. This gets much worse as the elements become heavier. You are not responsible for all of the exceptions, only the general principles.