Which of the following dynasties did not follow legalism and believed in the teachings of Confucius?
A: Qin Dynasty
B: Han Dynasty
C: Zhou Dynasty
D: Ming Dynasty