FR 9440 then FR 9904 at Lisbon
Madrid → Lisbon → Rome
Timetable, Lisbon time
21:15FR 9440 from Madrid at the gate
20:00FR 9904 to Rome leaves the gate
22 h 45 apart on the timetable, overnight
FR 9904 leaves 22 h 45 after FR 9440 arrives on the timetable: more than half a day, so not a connection we count.