IB 788 then FR 8345 at Madrid
Berlin → Madrid → Krakow
Timetable, Madrid time
10:15IB 788 from Berlin at the gatealso VY 5112, AA 8825
10:10FR 8345 to Krakow leaves the gate
23 h 55 apart on the timetable, overnight
FR 8345 leaves 23 h 55 after IB 788 arrives on the timetable: more than half a day, so not a connection we count.