KM 586 then FR 572 at Madrid
Valletta → Madrid → Porto
Timetable, Madrid time
20:40KM 586 from Valletta at the gate
09:15FR 572 to Porto leaves the gate
12 h 35 apart on the timetable, overnight
FR 572 leaves 12 h 35 after KM 586 arrives on the timetable: more than half a day, so not a connection we count.