Chanakya had two potential successors to Dhana Nanda: Pabbata and Chandragupta. He gave each of them an amulet to be worn around the neck with a woolen thread. One day, he decided to test them. While Chandragupta was asleep, he asked Pabbata to remove Chandragupta's woolen thread without breaking it and without waking up Chandragupta. Pabbata failed to accomplish this task. Some time later, when Pabbata was sleeping, Chanakya challenged Chandragupta to complete the same task. Chandragupta retrieved the woolen thread by cutting off Pabbata's head. For the next seven years, Chanakya trained Chandragupta for royal duties. When Chandragupta became an adult, Chanakya dug up his hidden treasure of gold coins, and assembled an army.