Ancient China was geographically isolated by mountains and deserts, which limited outside influences. Civilization developed along two major river systems, the Chang Jiang and Huang He rivers, where the fertile soil supported farming. Three major philosophies emerged during a period of conflict and disorder: Legalism advocated for a powerful government and strict laws to maintain order, Confucianism focused on social hierarchies, filial piety, and setting a good example, and Daoism believed in living harmoniously according to natural rhythms and avoiding involvement in government.