FR 6712 then FR 9602 at Madrid
Budapest → Madrid → Rome
Timetable, Madrid time
09:15FR 6712 from Budapest at the gate
09:10FR 9602 to Rome leaves the gate
23 h 55 apart on the timetable, overnight
FR 9602 leaves 23 h 55 after FR 6712 arrives on the timetable: more than half a day, so not a connection we count.