PROGRAMMING:Maximum value of T series
Hyz is a good girl, kind-hearted, naive and lovely, but often people say that she is stupid, that she is not good at math, she is very angry. However, after thinking about it, she found that she could not do anything to those people, so she had to vent her anger on the math problems. I didn't expect that the math problem was written in English. Fortunately, hyz English is good. I translated the problem to the effect: find out the maximum or minimum value in the input data!
###Input format:
There are several groups of input data, each group occupies a row, and the first number of each row is t. when t = 1, it means to find the maximum value; When t = 2, it means to find the minimum value. Next, enter an n (n < 100), which means the number of values to be counted, and then n integers; If t = 0, it means the end of input and the line is not processed.
###Output format:
For each group of input data, output the maximum or minimum value.
###Input example:
Here is a set of inputs. For example:
```in
1 2 1 5
2 6 1 2 3 4 5 6
0
```
###Output example:
The corresponding output is given here. For example:
```out
five
one
```
answer:If there is no answer, please comment
###Input format:
There are several groups of input data, each group occupies a row, and the first number of each row is t. when t = 1, it means to find the maximum value; When t = 2, it means to find the minimum value. Next, enter an n (n < 100), which means the number of values to be counted, and then n integers; If t = 0, it means the end of input and the line is not processed.
###Output format:
For each group of input data, output the maximum or minimum value.
###Input example:
Here is a set of inputs. For example:
```in
1 2 1 5
2 6 1 2 3 4 5 6
0
```
###Output example:
The corresponding output is given here. For example:
```out
five
one
```
answer:If there is no answer, please comment