FR 2527 then FR 2513 at Madrid
Berlin → Madrid → Bucharest
Timetable, Madrid time
12:30FR 2527 from Berlin at the gate
07:55FR 2513 to Bucharest leaves the gate
19 h 25 apart on the timetable, overnight
FR 2513 leaves 19 h 25 after FR 2527 arrives on the timetable: more than half a day, so not a connection we count.