FR 2527 then FR 2061 at Madrid
Berlin → Madrid → Palma de Mallorca
Timetable, Madrid time
12:30FR 2527 from Berlin at the gate
08:10FR 2061 to Palma de Mallorca leaves the gate
19 h 40 apart on the timetable, overnight
FR 2061 leaves 19 h 40 after FR 2527 arrives on the timetable: more than half a day, so not a connection we count.