It wasnarrated that Ibn 'Abbas said:
"The Messenger of Allah (ﷺ)said: 'Distribute wealth among those who are entitled to shares ofinheritance, according to the Book of Allah, then whatever is leftover goes to the nearest male relative.'" (RU)
English reference (RU): Vol. 4, Book 23, Hadith 2740 (RU)
Arabic reference (RU): Book 23, Hadith 2845 (RU)