Ancestors of mammals belong to:
Ornithischia
Therapsida
Chelonia
Silusidea
Therapsida includes mammals and their ancestors whose traits are very unique including an erect posture.