**How did Tom Riddle get his memories into the diary?**

Dumbledore explains to Harry in *Half-Blood Prince* that out of all the Horcruxes, the diary is both a Horcrux and a weapon. Not only did it store a portion of Voldemort's soul, but it had the ability to allow Voldemort to possess others, to make emotional connections with another, and to lead them to open the Chamber of Secrets.

>‘Hello, Harry Potter. My name is Tom Riddle. How did you come by my diary?’<br><br>
>These words, too, faded away, but not before Harry had started to scribble back.<br><br>
>‘Someone tried to flush it down a toilet.’ He waited eagerly for Riddle’s reply.<br><br>
>‘**Lucky that I recorded my memories in some more lasting way than ink**. But I always knew that there would be those who would not want this diary read.’<br><br>
>‘What do you mean?’ Harry scrawled, blotting the page in his excitement.<br><br>
>‘I mean that this diary holds memories of terrible things . . .'<br><br>

How did Tom Riddle infuse the diary with his own memories? (I realize that Tom Riddle used a quill and ink to write the words into the diary; what I'm asking is how the memories became embedded in the diary, and how they remained sentient.).