Write a program that prints the second largest value in each row of a given matrix.
Your solution must meet the following conditions:
Input
The input is a matrix of strictly positive integers. Each row of the matrix is given in a separate line. All lines have the same amount of elements. Each row contains at least two different values.
Output
The output is the list of the second largest values in each row, in the format shown in the examples.
Input
5 12 23 4 10 7 6 22 9 34 1 112
Output
second largest in row 0 is 12 second largest in row 1 is 10 second largest in row 2 is 34
Input
25 12 23 4 9 10 22 22 1 22 3 3 3 2 2 87 34 1 119 87
Output
second largest in row 0 is 23 second largest in row 1 is 10 second largest in row 2 is 2 second largest in row 3 is 87