FR 3429 then FR 5356 at Madrid
Agadir → Madrid → Krakow
Timetable, Madrid time
20:50FR 3429 from Agadir at the gate
20:00FR 5356 to Krakow leaves the gate
23 h 10 apart on the timetable, overnight
FR 5356 leaves 23 h 10 after FR 3429 arrives on the timetable: more than half a day, so not a connection we count.