We get into trouble making this cladogram because snakes came from ancestors that had legs, but lost them secondarily. We will learn later what a diapsid skull is, see PJH Fig. 10-21 if you are impatient. Snakes are derived members of the Amniote clade as well as the Diapsid clade. Refer to PJH Fig.
Legs are synapomorphic in tetrapods, and plesiomorphic in amniotes.
Loss of legs is apomorphic in amniotes, and in diapsids as well. Because the common ancestor of bats and birds did not have wings, bat wings and birds cannot be homologous as wings. As nonhomologous characters it is illegal to use bird and bat wings as a character state to construct the cladogram.