Khalid bin Sa'd (may Allah have mercy on him) narrates that a boy from the school became proficient, so Abu Mas'ud (may Allah be pleased with him) gave an order and bought walnuts for a dirham for his boys, and he disliked scattering (them to be snatched).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصداق / 14676