#K42232. Daily Maximum Temperatures

    ID: 27042 Type: Default 1000ms 256MiB

Daily Maximum Temperatures

Daily Maximum Temperatures

You are given temperature data for M cities over N days. For each day, your task is to determine the highest temperature recorded among all the cities. Formally, let \( T_{ij} \) denote the temperature of the \( i\)-th city on the \( j\)-th day. You need to compute a list \( \{max_j\} \) where \( max_j = \max_{1 \le i \le M} T_{ij} \) for \( j = 1,2,\dots,N \).

The input is read from standard input and the output should be printed to standard output.

inputFormat

The first line of the input contains two integers \( M \) and \( N \), representing the number of cities and the number of days respectively. The next \( M \) lines each contain \( N \) integers separated by spaces, describing the temperature data for each city over \( N \) days.

outputFormat

Output a single line with \( N \) integers separated by a space, where each integer is the maximum temperature recorded on that day.

## sample
3 5
30 25 28 29 32
31 24 27 26 30
29 26 24 27 31
31 26 28 29 32