Kerry warns of punishment for North Korea nuclear test