Yusuf - 12:22

وَلَمَّا بَلَغَ أَشُدَّهُ آتَيْنَاهُ حُكْمًا وَعِلْمًا وَكَذَلِكَ نَجْزِي الْمُحْسِنِينَ
[12:22]
And when he had attained his maturity, We gave him wisdom and knowledge: and thus do We reward those who do good.
When Joseph attained His full manhood, We gave him power and knowledge: thus do We reward those who do right.
And And when he reached his prime We gave him wisdom and knowledge. Thus We reward the good.