Highest Mountain himtn.X Farmer John has partitioned the pasture into a matrix of N x N (2 <= N <= 100) small squares and measured the altitude A_i,j of each square (0 <= A_i,j <= 2,000,000,000). FJ is currently positioned at square 1,1 and wishes to visit Bessie who, in no small coincidence, is at square N,N. FJ can travel north, south, east, and west (i.e., in a rectilinear manner) and cannot travel diagonally. Ever aware of altitude sickness, FJ wants to minimize the maximum height he encounters. Determine a path for FJ to get from grid coordinate 1,1 to N,N that minimizes the height of the highest piece of land encountered along that route. PROBLEM NAME: himtn INPUT FORMAT: * Line 1: A single integer: N * Lines 2..N: Line i+1 contains N space-separated integers that represent row i of the A matrix SAMPLE INPUT: 2 0 1 2 0 OUTPUT FORMAT: * Line 1: A single integer that is the maximum height. SAMPLE OUTPUT: 1