FB 471 then EW 3181 at Madrid
Sofia → Madrid → Prague
Timetable, Madrid time
16:20FB 471 from Sofia at the gate
13:55EW 3181 to Prague leaves the gatealso UX 3853
21 h 35 apart on the timetable, overnight
EW 3181 leaves 21 h 35 after FB 471 arrives on the timetable: more than half a day, so not a connection we count.