Three elements A,B and C. B is a noble gas, A has atomic number 1 less than B and C has 1 more than B. Hence number of valence shell is same in A and B because on adding one electron to Noble gas that is 18 group next electron will occupy, alkali metals group in a next period hence increases in shell number.