FR 2527 then FR 2436 at Madrid
Berlin → Madrid → Rome
Timetable, Madrid time
12:30FR 2527 from Berlin at the gate
09:35FR 2436 to Rome leaves the gate
21 h 05 apart on the timetable, overnight
FR 2436 leaves 21 h 05 after FR 2527 arrives on the timetable: more than half a day, so not a connection we count.