FR 5507 then FR 7071 at Madrid
Beauvais → Madrid → Gdansk
Timetable, Madrid time
18:55FR 5507 from Beauvais at the gate
10:15FR 7071 to Gdansk leaves the gate
15 h 20 apart on the timetable, overnight
FR 7071 leaves 15 h 20 after FR 5507 arrives on the timetable: more than half a day, so not a connection we count.