The first two days, she fails to guess his name correctly. In the final day a servant overhears the dwarf sing a song that contains his name, and tells the girl (who is now a queen), so she gets to keep the child. Rumpelstiltskin disappears angrily, never to be seen again.