FR 5898 then FR 2061 at Madrid
Torino → Madrid → Palma de Mallorca
Timetable, Madrid time
15:10FR 5898 from Torino at the gate
06:00FR 2061 to Palma de Mallorca leaves the gate
14 h 50 apart on the timetable, overnight
FR 2061 leaves 14 h 50 after FR 5898 arrives on the timetable: more than half a day, so not a connection we count.