FR 5898 then TP 1015 at Madrid
Torino → Madrid → Lisbon
Timetable, Madrid time
17:35FR 5898 from Torino at the gate
14:55TP 1015 to Lisbon leaves the gate
21 h 20 apart on the timetable, overnight
TP 1015 leaves 21 h 20 after FR 5898 arrives on the timetable: more than half a day, so not a connection we count.