Solution for Airport Baggage problem in Python