dǐ​jié​lì​xíng

to temper one's character