FR 9840 then FR 1317 at Lisbon
Cologne → Lisbon → APF
Timetable, Lisbon time
23:30FR 9840 from Cologne at the gate
15:55FR 1317 to APF leaves the gate
16 h 25 apart on the timetable, overnight
FR 1317 leaves 16 h 25 after FR 9840 arrives on the timetable: more than half a day, so not a connection we count.