I am a Brazilian who'll be studying from 28th Sep 2018 to 18th Feb in a Polish university (aprox 144 days). However, plane tickets to Poland are a bit more expensive and I decided to arrive and leave Europe through Paris, which had the lowest fare (arriving 10th September and leaving 20th February).
The problem is: I didn't know at the time Schengen visa conditions. Despite the fact that Brazilians don't need to apply for Schengen visas, we are under the same rules, after staying 90 days in Schengen area, I am not allowed to leave the country of my type D Polish visa for more 90 days.
Would it imply that leaving Poland for France, even if is just to catch my flight back to Brazil, is illegal? If so, is there any other way to do it without canceling my return ticket?