FR 3008 then EW 3181 at Madrid
Milan → Madrid → Prague
Timetable, Madrid time
19:50FR 3008 from Milan at the gate
13:55EW 3181 to Prague leaves the gate
18 h 05 apart on the timetable, overnight
EW 3181 leaves 18 h 05 after FR 3008 arrives on the timetable: more than half a day, so not a connection we count.