Sunan Ibn Majah
Hadith #2740
It was narrated that Ibn ‘Abbas said:“The Messenger of Allah (ﷺ) said: ‘Distribute wealth among those who are entitled to shares of inheritance, according to the Book of Allah, then whatever is left over goes to the nearest male relative.’”