How many republics was the Kingdom of Macedonia splintered into?