import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
public static void main
(String[] args
) {
int n;
Scanner sc
= new Scanner
(System.
in); n = sc.nextInt();
int[][] A = new int[n][n];
for (int i=0;i<n;i++) //ввод матрицы
{
for(int j=0;j<n;j++)
{
A[i][j] = sc.nextInt();
}
}
int[] b = new int[n];
for (int i=0;i<n;i++)
{
b[i]=0;
for(int j=0;j<n;j++)
{
b
[i
]+=Math.
abs(A
[j
][i
]); //вычисления по формуле }
}
for (int i=0;i<n;i++)
{
System.
out.
printf("%d ",b
[i
]); }
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIAoJewoJCWludCBuOwoJCVNjYW5uZXIgc2MgPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCW4gPSBzYy5uZXh0SW50KCk7CgkJaW50W11bXSBBICA9IG5ldyBpbnRbbl1bbl07CgkgICAgZm9yIChpbnQgaT0wO2k8bjtpKyspIC8v0LLQstC+0LQg0LzQsNGC0YDQuNGG0YsKCSAgICB7CgkgICAgICAgIGZvcihpbnQgaj0wO2o8bjtqKyspCgkgICAgICAgIHsKCSAgICAgICAgICAgIEFbaV1bal0gPSBzYy5uZXh0SW50KCk7CgkgICAgICAgIH0KCSAgICB9CgkgICAgaW50W10gYiA9IG5ldyBpbnRbbl07CgkgICAgZm9yIChpbnQgaT0wO2k8bjtpKyspCgkgICAgewoJICAgIAliW2ldPTA7CgkgICAgICAgIGZvcihpbnQgaj0wO2o8bjtqKyspCgkgICAgICAgIHsKCSAgICAgICAgICAgYltpXSs9TWF0aC5hYnMoQVtqXVtpXSk7IC8v0LLRi9GH0LjRgdC70LXQvdC40Y8g0L/QviDRhNC+0YDQvNGD0LvQtQoJICAgICAgICB9CgkgICAgfQoJICAgIGZvciAoaW50IGk9MDtpPG47aSsrKQoJICAgIHsKCSAgICAJU3lzdGVtLm91dC5wcmludGYoIiVkICIsYltpXSk7CgkgICAgfQoJfQp9