<Li> Kakavarna Kalashoka (395--367 BC) </Li> <Li> Mahanandin (367--345 BC) </Li> <Ul> <Li> Mahapadma Nanda Ugrasena (from 345 BC), illegitimate son of Mahanandin, founded the Nanda Empire after inheriting Mahanandin's empire </Li> <Li> Pandhuka </Li> <Li> Panghupati </Li> <Li> Bhutapala </Li> <Li> Rashtrapala </Li> <Li> Govishanaka </Li> <Li> Dashasidkhaka </Li> <Li> Kaivarta </Li> <Li> Dhana Nanda (Agrammes, Xandrammes) (until 321 BC), overthrown by Chandragupta Maurya </Li> </Ul> <Li> Mahapadma Nanda Ugrasena (from 345 BC), illegitimate son of Mahanandin, founded the Nanda Empire after inheriting Mahanandin's empire </Li>

Who was the last ruler of magadha kingdom