FR 5057 then FR 9493 at Madrid
Dakhla → Madrid → Pisa
Timetable, Madrid time
18:20FR 5057 from Dakhla at the gate
18:10FR 9493 to Pisa leaves the gate
23 h 50 apart on the timetable, overnight
FR 9493 leaves 23 h 50 after FR 5057 arrives on the timetable: more than half a day, so not a connection we count.