AZ 1602 then FR 5872 at Fiumicino
Bari → Rome → Gdansk
Timetable, Rome time
07:40AZ 1602 from Bari at the gate
06:25FR 5872 to Gdansk leaves the gate
22 h 45 apart on the timetable, overnight
FR 5872 leaves 22 h 45 after AZ 1602 arrives on the timetable: more than half a day, so not a connection we count.