UX 16 then AV 6518 at Madrid
La Mesa → Madrid → Frankfurt am Main
Timetable, Madrid time
23:10UX 16 from La Mesa at the gate
13:20AV 6518 to Frankfurt am Main leaves the gate
14 h 10 apart on the timetable, overnight
AV 6518 leaves 14 h 10 after UX 16 arrives on the timetable: more than half a day, so not a connection we count.