惩前毖后

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

毖

bì

careful

后

hòu

back