During the Post-Classical Era, East Asia went through significant changes. For nearly 400 years in China after the Han dynasty fall, there was chaos and anarchy. All of that changed when the Sui dynasty unified China again, but they did so through violence and repression which led to their quick demise after just 40 years. Then, the Tang and Song dynasties continued to rule over a unified China and became enormously prosperous and stable through a complex regional tributary system and a return to Confucian political ideals. Both Korea and Japan were affected by the spread of Chinese culture, but also retained their own traditions. Maritime trade also flourished in China with traders using Southern trade routes to trade goods, leading to the diffusion of Buddhism across the continent.