FR 6712 then FR 3814 at Madrid
Budapest → Madrid → Bologna
Timetable, Madrid time
18:10FR 6712 from Budapest at the gate
12:45FR 3814 to Bologna leaves the gate
18 h 35 apart on the timetable, overnight
FR 3814 leaves 18 h 35 after FR 6712 arrives on the timetable: more than half a day, so not a connection we count.