惩前毖后

chéng qián bì hòu

lit. to punish those before to prevent those after (idiom); to criticize former mistakes firmly to prevent them happening again

chéng

to punish

qián

front

careful

hòu

back