Mahajanapadas were a set of sixteen kingdoms or oligarchic republics that existed in ancient India from the sixth to fourth centuries BCE during the second urbanization period. The term "Mahajanapada" means "great realm" or "great kingdom". These states were considered to be the most prominent among them. Many of these kingdoms functioned as republics governed by a general assembly and a council of elders led by an elected “king consul” . The Mahajanapadas are the historical context of the Sanskrit epics, such as the Mahabharata and the Ramayana, as well as Puranic literature. They were also the political and social context in which Buddhism and Jainism emerged and developed. The list of the sixteen Mahajanapadas includes Kasi, Kosala, Anga, Magadha, Vajji, Malla, Chedi/Cheti, Vatsa, Kuru, Panchala, Matsya, Surasena, Assaka, Avanti, Gandhara, and Kamboja.