It can be observed that 9 students have their blood group as A,
6 have their blood group as B,
3 have their blood group as AB
and 12 have their blood group as O.
Therefore, the blood group of 30 students of the class can be represented as follows.
It can be observed clearly that the most common blood group and the rarest blood group among these students is O and AB respectively as 12 students have their blood group as O, and 3 students have their blood group as AB.