How did God write the ten commandments?

People usually mistake and say Moses wrote the ten commandments when really he didn't. God called Moses upon the mountain and when Moses came he brought the stone tablet, and while he was up there God wrote the ten commandments in Hebrew with his finger