Thousands rally against Czech president's attack on media