Here are the correct terms to fill in the blanks:
A dynasty is a family that rules a nation from generation to generation. Dynasties in China ruled by the Mandate of Heaven which stated that the leader was chosen by heaven to rule.
Legalism is a philosophy based on qualifications instead of birth. Filial piety is an example of Confucianism respect of children to parents and citizens to rulers.