n-th Largest Value#2440

n-th Largest Value

1 second
64 megabytes
Very easy

You must write a program that outputs the -th largest value in a fixed-size array of integers. To simplify the task, n = 3, and each array will always contain decimal integer values.

Input

The first line contains a single integer (1 \leq p \leq 1000), the number of data sets. Each data set consists of a single line containing the data set number, followed by a space, then space-separated decimal integers, each in the range from to inclusive.

Output

For each data set, output one line containing the data set number, a space, and the -rd largest value among the corresponding integers.

Examples

Example 1

Loading
Loading