FR 6712 then FR 5995 at Madrid
Budapest → Madrid → London Stansted
Timetable, Madrid time
12:55FR 6712 from Budapest at the gate
10:05FR 5995 to London Stansted leaves the gate
21 h 10 apart on the timetable, overnight
FR 5995 leaves 21 h 10 after FR 6712 arrives on the timetable: more than half a day, so not a connection we count.