Upgrading and downgrading
1. If an operating air carrier places a passenger in a class higher than that for which the ticket was purchased, it may not request any supplementary payment.
2. If an operating air carrier places a passenger in a class lower than that for which the ticket was purchased, it shall within seven days, by the means provided for in Article 7(3), reimburse
(a) 30 % of the price of the ticket for all flights of 1500 kilometres or less, or
(b) 50 % of the price of the ticket for all intra-Community flights of more than 1500 kilometres, except flights between the European territory of the Member States and the French overseas departments, and for all other flights between 1500 and 3500 kilometres, or
(c) 75 % of the price of the ticket for all flights not falling under (a) or (b), including flights between the European territory of the Member States and the French overseas departments.
This is the complete Article 10 dealing with downgrades.
As you can see no reference for exceptions is made in the Article.
Only for flight cancellations made at least two weeks before the flight are exempt from compensation.
I'm not sure if your situation equals to a flight cancellation this far in advance, but it could be.
If I were you I'd fly F to Sao Paulo (maybe fly LH on the inbound and LX on the outbound?) and then onwards to Rio with one of the brazillian carriers.