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