W4 3173 then FR 9440 at Madrid
Bucharest → Madrid → Lisbon
Timetable, Madrid time
17:50W4 3173 from Bucharest at the gate
16:50FR 9440 to Lisbon leaves the gate
23 h apart on the timetable, overnight
FR 9440 leaves 23 h after W4 3173 arrives on the timetable: more than half a day, so not a connection we count.