The old couple prayed for a child and the giant overheard. He agreed to give them a child if they promised to give the child to him after 17 years. A cucumber grew with a baby girl inside, Timun Mas. When she turned 17, the giant came to collect her. The parents got magic items from a hermit to help Timun Mas escape. She used seeds to grow a cucumber field, a needle to make a thorn forest, and shrimp paste to turn a field into a mud pit, trapping the giant so she could be safe with her parents.