FR 5322 then FB 472 at Madrid
Milan → Madrid → Sofia
Timetable, Madrid time
19:45FR 5322 from Milan at the gate
17:20FB 472 to Sofia leaves the gate
21 h 35 apart on the timetable, overnight
FB 472 leaves 21 h 35 after FR 5322 arrives on the timetable: more than half a day, so not a connection we count.