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