FR 8859 then FR 9904 at Lisbon
Budapest → Lisbon → Rome
Timetable, Lisbon time
17:30FR 8859 from Budapest at the gate
16:40FR 9904 to Rome leaves the gate
23 h 10 apart on the timetable, overnight
FR 9904 leaves 23 h 10 after FR 8859 arrives on the timetable: more than half a day, so not a connection we count.