You are given an N \times N matrix of numbers.
Your task is to choose numbers such that each number comes from a different row and a different column. The goal is to minimize the largest number among the selected ones.
The input begins with an integer (1 \le N \le 100), followed by N^2 non-negative integers, each not greater than .
Print the smallest possible value of the largest number among the selected numbers.
Example 1