Kong Rong Shares Pears
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
64bit IO Format: %lld

题目描述


Kong Rong shares pears, everyone praises!

Kong Rong's kindergarten has N children. The teacher often gives each child a pear. Kong Rong always chooses the smallest one.




输入描述:

The first line is two positive integers, T (1≤T≤100) and N (1≤N≤1000), indicating that there are T test cases and N children.

Next, there are T lines, each line is the input of a test case, that is, N positive integers not greater than 1000 are input, representing the size of N pears.


输出描述:

The output of each test case occupies one line, which is a positive integer, representing the pear size selected by Kong Rong in this test case.

示例1

输入

复制
2 6
1 2 3 4 5 6
3 2 4 5 6 7

输出

复制
1
2