FR 5316 then W4 3692 at Madrid
Rome → Madrid → Iasi
Timetable, Madrid time
23:40FR 5316 from Rome at the gate
18:30W4 3692 to Iasi leaves the gate
18 h 50 apart on the timetable, overnight
W4 3692 leaves 18 h 50 after FR 5316 arrives on the timetable: more than half a day, so not a connection we count.