Sirach (Ecclesiasticus) 16:15

All mercy shall make a place for every man according to the merit of his works, and according to the wisdom of his sojournment.

Douay-Rheims Bible