Thousands of protesters ransacked the Congress, presidential palace, and Supreme Court in Brasilia.