TP 1017 then FR 9904 at Lisbon
Madrid → Lisbon → Rome
Timetable, Lisbon time
18:25TP 1017 from Madrid at the gate
16:40FR 9904 to Rome leaves the gate
22 h 15 apart on the timetable, overnight
FR 9904 leaves 22 h 15 after TP 1017 arrives on the timetable: more than half a day, so not a connection we count.