FR 9840 then UX 1156 at Lisbon
Cologne → Lisbon → Madrid
Timetable, Lisbon time
23:30FR 9840 from Cologne at the gate
16:05UX 1156 to Madrid leaves the gate
16 h 35 apart on the timetable, overnight
UX 1156 leaves 16 h 35 after FR 9840 arrives on the timetable: more than half a day, so not a connection we count.