AHMAD 12722:
from Anas b. Mālik —
[Machine] The Messenger of Allah ﷺ used to say, "Indeed, the best [outcome] is the best [outcome] of the hereafter." Or he would say, "O Allah, there is no good except the good of the hereafter, so forgive the Ansar and the Muhajireen." Shu'bah said, "Qatada used to say, 'This is in reference to his stories.'"
أحمد ١٢٧٢٢:
عن انس بن مالك —
أَنَّ رَسُولَ اللهِ ﷺ كَانَ يَقُولُ إِنَّ الْخَيْرَ خَيْرُ الْآخِرَةِ أَوْ قَالَ اللهُمَّ لَا خَيْرَ إِلَّا خَيْرُ الْآخِرَهْ فَاغْفِرْ لِلْأَنْصَارِ وَالْمُهَاجِرَهْ قَالَ شُعْبَةُ فَكَانَ قَتَادَةُ يَقُولُ هَذَا فِي قَصَصِهِ
hadithunlocked.com