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