FR 5357 then W4 7403 at Madrid
Krakow → Madrid → Palma de Mallorca
Timetable, Madrid time
22:20FR 5357 from Krakow at the gate
20:00W4 7403 to Palma de Mallorca leaves the gate
21 h 40 apart on the timetable, overnight
W4 7403 leaves 21 h 40 after FR 5357 arrives on the timetable: more than half a day, so not a connection we count.