how many shells r needed 4 the elements in each of the 1st rows of the periodic table.

Im kind of getting confused. When it says rows; does it refer to groups or no? I referred rows to the groups for my last question and came up with a pattern, but now I'm unsure of of myself.

Rows go this way ---------

Columns go this way
|
|
|
|
|
First row needs 1 shell
Second row needs 2 shells.
Third row needs 3 shells.