AA 3389 then UA 5904 at O'Hare
Fargo → Chicago → Madison
Timetable, Chicago time
20:39AA 3389 from Fargo at the gate
15:50UA 5904 to Madison leaves the gate
19 h 11 apart on the timetable, overnight
UA 5904 leaves 19 h 11 after AA 3389 arrives on the timetable: more than half a day, so not a connection we count.