The electronic configuration of an element 'X' is 2,8,8,2

The electronic configuration of an element ‘X’ is 2,8,8,2. To which (a) period and (b) group of the modem periodic table does ‘X’ belong ? State its valency. Justify your answer in each case.

(a) 4th period, because it has four shells.
(b) 2nd group, because it has two valence electrons.
It will show valency of 2 (or+2) because it will ’ lose two electrons to become stable