From Pope St. John Paul II’s encyclical Veritatis Splendor (1993):
The dialogue of Jesus with the rich young man, related in the nineteenth chapter of Saint Matthew’s Gospel, can serve as a useful guide for listening once more in a lively and direct way to his moral teaching: “Then someone came to him and said, ‘Teacher, what good must I do to have eternal life?’ And he said to him, ‘Why do you ask me about what is good? There is only one who is good. If you wish to enter into life, keep the commandments.’ He said to him, ‘Which ones?’ And Jesus said, ‘You shall not murder; You shall not commit adultery; You shall not steal; You shall not bear false witness; Honour your father and mother; also, You shall love your neighbour as yourself.’ The young man said to him, ‘I have kept all these; what do I still lack?’ Jesus said to him, ‘If you wish to be perfect, go, sell your possessions and give the money to the poor, and you will have treasure in heaven; then come, follow me'” (Mt 19:16-21).13
13 Cf. Apostolic Epistle Parati Semper to the Young People of the World on the occasion of the International Year of Youth (March 31, 1985), 2-8: Acta Apostolicae Sedis 77 (1985), 581-600.
— Veritatis Splendor 6