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 k - the program should remove the k-th element from the linked list.
Input
The initial data for the linked list is obtained automatically. You don’t need to do anything.
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 k if the program should remove the k-th node (0 ≤ k ≤ |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.