President Vladimir Putin, who is expected to run for what would be a fourth term next year, spoke out against last week’s protests on Thursday, saying that anyone who broke the law should be punished.