Design Parking System

class ParkingSystem:

    def __init__(self, big: int, medium: int, small: int):
        self.slots = [small, medium, big]

    def addCar(self, carType: int) -> bool:
        for ctype in range(3, 0, -1):
            if carType == ctype:
                if self.slots[3 - ctype] > 0:
                    self.slots[3 - ctype] = self.slots[3 - ctype] - 1
                    return True
        return False