FR 5120 then EW 3181 at Madrid
Milan Bergamo → Madrid → Prague
Timetable, Madrid time
17:35FR 5120 from Milan Bergamo at the gate
13:55EW 3181 to Prague leaves the gate
20 h 20 apart on the timetable, overnight
EW 3181 leaves 20 h 20 after FR 5120 arrives on the timetable: more than half a day, so not a connection we count.