Hafiz Ibn Hajar writes in his book Munabbihaat:
Uthman (RA) while explaining the Quraanic verse:
وَأَمَّا الْجِدَارُ فَكَانَ لِغُلاَمَيْنِ يَتِيمَيْنِ فِي الْمَدِينَةِ وَكَانَ تَحْتَهُ كَنزٌ لَهُمَا وَكَانَ أَبُوهُمَا صَالِحًا فَأَرَادَ رَبُّكَ أَنْ يَبْلُغَا أَشُدَّهُمَا وَيَسْتَخْرِجَا كَنزَهُمَا رَحْمَةً مِنْ رَبِّكَ وَمَا فَعَلْتُهُ عَنْ أَمْرِي ذَلِكَ تَأْوِيلُ مَا لَمْ تَسْطِعْ عَلَيْهِ صَبْرًا
“And as for the wall, it belonged to two orphan boys in the city, and under it, there was a treasure that belonged to them. Their father was a righteous man and your Lord intended that they should come of age and then bring forth their treasure as a mercy from your Lord; I did not do this of my own bidding.” (Surah Al-Kahf 18:82)
said: The treasure meant a golden tablet, on which were written the following seven lines:
1) I wonder at the man who knows that he is to die and indulges in laughter.
2) I wonder at the man who knows that this world will come to an end one day, but hankers after it.
3) I wonder that a man who knows everything is predestined should lament the loss of anything.
4) I wonder that a man who believes in the reckoning in the Hereafter should amass wealth.
5) I wonder that a man who has the knowledge of the fire of Hell should commit any sin.
6) I wonder that a man who believes in Almighty Allah should remember anybody other than Him.
7) I wonder that a man who believes in Paradise should feel pleasure of this world.”
In some editions of in the book, it is also added: “I wonder that a man who knows Shaytaan is his eternal enemy should obey and follow him.”