Under which dynasty was Chinese writing first developed?

the Qin dynasty
the Zhou dynasty
the Shang dynasty
the Han dynasty