PROGRAMMING:Insert sort or heap sort
According to the definition of Wikipedia:
**Insert sort * * is an iterative algorithm, which obtains the input data one by one and produces an orderly output sequence step by step. In each iteration, the algorithm takes an element from the input sequence and inserts it into the correct position in the ordered sequence. So iterate until all the elements are in order.
**Heap sorting * * also divides the input into ordered and unordered parts, iteratively finds the largest element from the unordered part and puts it into the ordered part. It takes advantage of the feature that the top element of the large root heap is the largest, which makes it easy to select the largest element in the current unordered region.
Now, given the original sequence and the intermediate sequence generated by a sort algorithm, please judge which sort algorithm this algorithm is?
###Input format:
Enter the positive integer n ($$$Le $$100) in the first line; The next line gives n integers of the original sequence; The last line gives the intermediate sequence generated by a sort algorithm. Here, we assume that the target sequence is ascending. Numbers are separated by spaces.
###Output format:
First, in line 1, output 'insertion sort' for insertion sort, or 'heap sort' for heap sort; Then, in the second line, the result sequence of another iteration with the sorting algorithm is output. The questions ensure that the results of each group are unique. The numbers should be separated by spaces, and there should be no extra spaces at the beginning and end of the line.
###Input sample 1:
```in
ten
3 1 2 8 7 5 9 4 6 0
1 2 3 7 8 5 9 4 6 0
```
###Output sample 1:
```out
Insertion Sort
1 2 3 5 7 8 9 4 6 0
```
###Input example 2:
```in
ten
3 1 2 8 7 5 9 4 6 0
6 4 5 1 0 3 2 7 8 9
```
###Output example 2:
```out
Heap Sort
5 4 3 1 0 2 6 7 8 9
```
answer:If there is no answer, please comment
**Insert sort * * is an iterative algorithm, which obtains the input data one by one and produces an orderly output sequence step by step. In each iteration, the algorithm takes an element from the input sequence and inserts it into the correct position in the ordered sequence. So iterate until all the elements are in order.
**Heap sorting * * also divides the input into ordered and unordered parts, iteratively finds the largest element from the unordered part and puts it into the ordered part. It takes advantage of the feature that the top element of the large root heap is the largest, which makes it easy to select the largest element in the current unordered region.
Now, given the original sequence and the intermediate sequence generated by a sort algorithm, please judge which sort algorithm this algorithm is?
###Input format:
Enter the positive integer n ($$$Le $$100) in the first line; The next line gives n integers of the original sequence; The last line gives the intermediate sequence generated by a sort algorithm. Here, we assume that the target sequence is ascending. Numbers are separated by spaces.
###Output format:
First, in line 1, output 'insertion sort' for insertion sort, or 'heap sort' for heap sort; Then, in the second line, the result sequence of another iteration with the sorting algorithm is output. The questions ensure that the results of each group are unique. The numbers should be separated by spaces, and there should be no extra spaces at the beginning and end of the line.
###Input sample 1:
```in
ten
3 1 2 8 7 5 9 4 6 0
1 2 3 7 8 5 9 4 6 0
```
###Output sample 1:
```out
Insertion Sort
1 2 3 5 7 8 9 4 6 0
```
###Input example 2:
```in
ten
3 1 2 8 7 5 9 4 6 0
6 4 5 1 0 3 2 7 8 9
```
###Output example 2:
```out
Heap Sort
5 4 3 1 0 2 6 7 8 9
```
answer:If there is no answer, please comment