#include <stdio.h>
int main() {
int n, n1, arr[250001];
int max = 0;
int pos = 0;
for (int i
= 1; i
<= n
* n1
; i
++) scanf("%d", &arr
[i
]); for (int i = 1; i <= n; i++) {
int c = 0;
for (int j = i; j <= n1 * n; j += n) c += arr[j];
if (max <= c) {
max = c;
pos = i;
}
}
}
//https://pt.stackoverflow.com/q/257384/101
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKCkgewogICAgaW50IG4sIG4xLCBhcnJbMjUwMDAxXTsKICAgIHNjYW5mKCIlZCAlZCIsICZuLCAmbjEpOwogICAgaW50IG1heCA9IDA7CiAgICBpbnQgcG9zID0gMDsKICAgIGZvciAoaW50IGkgPSAxOyBpIDw9IG4gKiBuMTsgaSsrKSBzY2FuZigiJWQiLCAmYXJyW2ldKTsKICAgIGZvciAoaW50IGkgPSAxOyBpIDw9IG47IGkrKykgewogICAgICAgIGludCBjID0gMDsKICAgICAgICBmb3IgKGludCBqID0gaTsgaiA8PSBuMSAqIG47IGogKz0gbikgYyArPSBhcnJbal07CiAgICAgICAgaWYgKG1heCA8PSBjKSB7CiAgICAgICAgICAgIG1heCA9IGM7CiAgICAgICAgICAgIHBvcyA9IGk7CiAgICAgICAgfQogICAgfQogICAgcHJpbnRmKCIlZCIsIHBvcyk7Cn0KCi8vaHR0cHM6Ly9wdC5zdGFja292ZXJmbG93LmNvbS9xLzI1NzM4NC8xMDE=