FR 9601 then TP 1017 at Madrid
Rome → Madrid → Lisbon
Timetable, Madrid time
19:10FR 9601 from Rome at the gate
18:00TP 1017 to Lisbon leaves the gate
22 h 50 apart on the timetable, overnight
TP 1017 leaves 22 h 50 after FR 9601 arrives on the timetable: more than half a day, so not a connection we count.