FR 5930 then FR 3009 at Madrid
Fes → Madrid → Milan
Timetable, Madrid time
16:25FR 5930 from Fes at the gate
09:15FR 3009 to Milan leaves the gate
16 h 50 apart on the timetable, overnight
FR 3009 leaves 16 h 50 after FR 5930 arrives on the timetable: more than half a day, so not a connection we count.