Who wrote the (second set of) ten commandments?

God gave Moses the first set of commanments in Exodus 20. Later,in Exodus 34, God gave Moses another
(completely different) set, and this time they are written in stone. But who wrote them, God or Moses?

God

And the LORD said unto Moses, Hew thee two tables of stone like unto the first: and
I will write upon
these tables the words that were in the first tables, which thou brakest. Exodus 34:1

Moses

And the LORD said unto Moses, Write thou these words: ... And he wrote upon the tables the words of the covenant, the ten
commandments. Exodus 34:27