Sirach 16:12

Great as is his mercy, so also is his chastisement; he judges a person according to his or her deeds.