The Mahajanapadas were a set of sixteen kingdoms that existed in ancient India from the sixth to fourth centuries BCE.