FR 1026 then FR 10 at Dublin
Budapest → Dublin → Madrid
Timetable, Dublin time
12:40FR 1026 from Budapest at the gate
10:00FR 10 to Madrid leaves the gate
21 h 20 apart on the timetable, overnight
FR 10 leaves 21 h 20 after FR 1026 arrives on the timetable: more than half a day, so not a connection we count.