PROGRAMMING:Parking management
There is a long and narrow parking lot which can park n cars. It has only one gate for cars to enter and leave. According to the time sequence of arriving at the parking lot, the vehicles are parked from the innermost part of the parking lot to the gate (that is, the first vehicle arriving first is parked at the innermost part of the parking lot). If the parking lot is full of N vehicles, the vehicles arriving later can only wait on the sidewalk outside the gate of the parking lot. Once there are vehicles in the parking lot, the first vehicle on the sidewalk can enter the parking lot. If there is a car to drive away in the parking lot, the cars that enter the parking lot after it must first leave the parking lot to make way for it. After they leave the parking lot, these vehicles will enter the parking lot in the original order. When leaving the parking lot, every car should pay according to the length of time it stays in the parking lot. No parking fee will be charged for the car staying on the sidewalk. Write a program to manage the parking lot.
###Input format:
First, enter an integer n (n < = 10), and then enter several groups of data. Each group of data includes three data items: the information of the car's arrival or departure (a means arrival, D means departure, e means end), the car number, and the time of the car's arrival or departure.
###Output format:
If a vehicle arrives, the parking position of the vehicle will be output; If a vehicle leaves, the time of the vehicle staying in the parking lot will be output. If the car number does not exist, output the car not in park
###Input example:
```in
three
A 1 1
A 2 2
A 3 3
D 1 4
A 4 5
A 5 6
D 4 7
D 5 8
E 0 0
```
###Output example:
```out
car#1 in parking space #1
car#2 in parking space #2
car#3 in parking space #3
car#1 out,parking time 3
car#4 in parking space #3
car#5 waiting
car#4 out,parking time 2
car#5 in parking space #3
car#5 out,parking time 1
```
answer:If there is no answer, please comment
###Input format:
First, enter an integer n (n < = 10), and then enter several groups of data. Each group of data includes three data items: the information of the car's arrival or departure (a means arrival, D means departure, e means end), the car number, and the time of the car's arrival or departure.
###Output format:
If a vehicle arrives, the parking position of the vehicle will be output; If a vehicle leaves, the time of the vehicle staying in the parking lot will be output. If the car number does not exist, output the car not in park
###Input example:
```in
three
A 1 1
A 2 2
A 3 3
D 1 4
A 4 5
A 5 6
D 4 7
D 5 8
E 0 0
```
###Output example:
```out
car#1 in parking space #1
car#2 in parking space #2
car#3 in parking space #3
car#1 out,parking time 3
car#4 in parking space #3
car#5 waiting
car#4 out,parking time 2
car#5 in parking space #3
car#5 out,parking time 1
```
answer:If there is no answer, please comment