What is the version of the following sentence with correct punctuation?

Just by the palace the magician stopped to wish the princess farewell and to whisper in her ear Tomorrow think of my head But the traveller heard it and just as the princess slipped through the window into her bedroom and the magician turned round to fly back to the mountain he seized him by the long black beard and with his sabre cut off the wicked conjurors head just behind the shoulders so that he could not even see who it was He threw the body into the sea to the fishes and after dipping the head into the water he tied it up in a silk handkerchief took it with him to the inn and then went to bed
Just by the palace the magician stopped to wish the princess farewell, and to whisper in her ear, "To-morrow think of my head." But the traveller heard it, and just as the princess slipped through the window into her bedroom, and the magician turned round to fly back to the mountain, he seized him by the long black beard, and with his sabre cut off the wicked conjuror's head just behind the shoulders, so that he could not even see who it was. He threw the body into the sea to the fishes, and after dipping the head into the water, he tied it up in a silk handkerchief, took it with him to the inn, and then went to bed.