Ancient China developed a unique culture due to its isolated geography along major river valleys and surrounded by natural barriers like mountains and deserts. The geography influenced the development of political and social structures, including the philosophy of the Mandate of Heaven and the emphasis on filial piety. Major religious and philosophical traditions that emerged in China and gained popularity included Confucianism, Daoism, Buddhism, and Legalism. The Great Wall of China was constructed starting in the 3rd century BCE and reconstructed during the Ming Dynasty to protect against nomadic tribes from the north.