UX 1152 then FR 8345 at Madrid
Lisbon → Madrid → Krakow
Timetable, Madrid time
10:15UX 1152 from Lisbon at the gate
10:10FR 8345 to Krakow leaves the gate
23 h 55 apart on the timetable, overnight
FR 8345 leaves 23 h 55 after UX 1152 arrives on the timetable: more than half a day, so not a connection we count.