Give The Shares Of Inheritance To Those Who Are Entitled To Them, And Whatever Is Left Goes To The Closest Male Relative Sahih Muslim 1615 b

Arabic hadith text
حَدَّثَنَا أُمَيَّةُ بْنُ بِسْطَامَ الْعَيْشِيُّ، حَدَّثَنَا يَزِيدُ بْنُ زُرَيْعٍ، حَدَّثَنَا رَوْحُ بْنُ الْقَاسِمِ، عَنْ عَبْدِ اللَّهِ بْنِ طَاوُسٍ، عَنْ أَبِيهِ، عَنِ ابْنِ عَبَّاسٍ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم قَالَ ‏"‏أَلْحِقُوا الْفَرَائِضَ بِأَهْلِهَا فَمَا تَرَكَتِ الْفَرَائِضُ فَلأَوْلَى رَجُلٍ ذَكَرٍ ‏"
Translation
Ibn 'Abbas (Allah be pleased with them) reported Allah's Messenger (ﷺ) as saying

Give the shares to those who are entitled to them, and what is left from those wno are entitled to it goes to the nearest male heir.