import numpy as np
n, m = map(int, input().split())
matrix = np.array([input().split() for i in range(n)], int)
print(np.max(np.min(matrix, axis=1)))

d38aa9aed26d09eeba191ae2d1a2cf06dc1e4cf5
<mask token>

<mask token>
print(np.max(np.min(matrix, axis=1)))

<mask token>
n, m = map(int, input().split())
matrix = np.array([input().split() for i in range(n)], int)
print(np.max(np.min(matrix, axis=1)))

import numpy as np
n, m = map(int, input().split())
matrix = np.array([input().split() for i in range(n)], int)
print(np.max(np.min(matrix, axis=1)))
