declare and initialize variables with appropriate value
principalMin = mat [ 0 ] [ 0 ] NEW_LINE principalMax = mat [ 0 ] [ 0 ] NEW_LINE secondaryMin = mat [ 0 ] [ n - 1 ] NEW_LINE secondaryMax = mat [ 0 ] [ n - 1 ] NEW_LINE for i in range ( 1 , n ) : NEW_LINE INDENT for j in range ( 1 , n ) : NEW_LINE DEDENT