#K67697. Car Rental Service

    ID: 32700 Type: Default 1000ms 256MiB

Car Rental Service

Car Rental Service

You are required to implement a car rental system. The system supports three types of operations:

  • 1 car_id car_type: Add a car with unique identifier car_id and type car_type to the fleet.
  • 2 car_id: Remove the car with identifier car_id from the fleet.
  • 3 car_type: Request a car of type car_type. If there is at least one available car of that type, return the car with the smallest id, i.e. \(\min\{id\}\). Otherwise, output "No car available".

The operations must be processed in the order they are given.

inputFormat

The input is given via standard input. The first line contains a single integer n which indicates the number of operations.

The following n lines each contain an operation in one of the following forms:

  • 1 car_id car_type
  • 2 car_id
  • 3 car_type

outputFormat

For each operation of type 3 (request car), output the result on a separate line. If a car is available, output its id; otherwise, output "No car available".

## sample
7
1 101 SUV
1 102 Sedan
1 103 SUV
3 SUV
2 103
3 SUV
3 Sedan
101

No car available 102

</p>