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