Given a linked list, you are asked to execute q queries on it. There are 2 types of queries:
print - the program should print the linked list
remove l r - remove all the elements starting from l-th and ending at r-th both inclusive.
Input
The initial data for the linked list is obtained automatically. You don’t need to do anything. It’s guaranteed that the size of the linked list does not exceed 1000 and the values in the linked list do not exceed in their absolute value.
The first line of the input contains a single integer q (1 ≤ q ≤ 1000).
The next q lines contain the queries - print in case the program should print the linked list, and remove l r if the program should remove the values between the l-th and the r-th elements (1 ≤ l, r ≤ |L|).
Output
The program should correctly print the values in the linked list for all the print queries. The values should be separated by spaces.