Read about the history of the kingdoms here
https://www.historyfiles.co.uk/FeaturesFarEast/IndiaHistory05.htm