PROGRAMMING:Operation of heap
Write code to realize the operation of Min heap.
###Input format:
The first line is two positive integers' n 'and' k 'no larger than' 1000 ', separated by spaces. Where 'n' is the capacity of the heap. You need to create a heap with 'n' capacity.
The next 'k' line is the sequential 'k' item insertion or deletion operations on this heap: insert element x with '1 x'; Delete the top of the heap with '- 1'.
The next line is a positive integer'm 'not greater than' 1000 ',
The next line is'm 'integers (within the range of integers), separated by spaces,
It is required to adjust the list of'm 'integers to a minimum heap.
###Output format:
For the 'k' operation of the first heap, after each operation, the heap elements are printed in order in a row, and the elements are separated by a space;
For the second heap, after adjustment, print the heap elements in order in a row, separated by a space.
###Input example:
```in
10 8
1 1
1 2
1 3
1 4
1 5
-1
1 6
-1
eight
1 2 3 4 5 6 7 8
```
###Output example:
```out
one
1 2
1 2 3
1 2 3 4
1 2 3 4 5
2 4 3 5
2 4 3 5 6
3 4 6 5
1 2 3 4 5 6 7 8
```
answer:If there is no answer, please comment
###Input format:
The first line is two positive integers' n 'and' k 'no larger than' 1000 ', separated by spaces. Where 'n' is the capacity of the heap. You need to create a heap with 'n' capacity.
The next 'k' line is the sequential 'k' item insertion or deletion operations on this heap: insert element x with '1 x'; Delete the top of the heap with '- 1'.
The next line is a positive integer'm 'not greater than' 1000 ',
The next line is'm 'integers (within the range of integers), separated by spaces,
It is required to adjust the list of'm 'integers to a minimum heap.
###Output format:
For the 'k' operation of the first heap, after each operation, the heap elements are printed in order in a row, and the elements are separated by a space;
For the second heap, after adjustment, print the heap elements in order in a row, separated by a space.
###Input example:
```in
10 8
1 1
1 2
1 3
1 4
1 5
-1
1 6
-1
eight
1 2 3 4 5 6 7 8
```
###Output example:
```out
one
1 2
1 2 3
1 2 3 4
1 2 3 4 5
2 4 3 5
2 4 3 5 6
3 4 6 5
1 2 3 4 5 6 7 8
```
answer:If there is no answer, please comment