#include <iostream>
#include <math.h>
using namespace std;
int main() {
int n;
cin >> n;
double z[n][n], b[n];
for(int i = 0; i < n; i++)
{
for(int j = 0; j < n; j++)
{
cin >> z[i][j];
}
}
for (int i = 0; i < n; i++)
{
b[i] = 0;
for(int j = 0; j < n; j++)
if(z[i][j] < 0)
{
b[i] = 1;
break;
}
}
for (int i = 0; i < n; i++)
{
cout << b[i] << " ";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWF0aC5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmludCBtYWluKCkgewoJaW50IG47CgljaW4gPj4gbjsKCWRvdWJsZSB6W25dW25dLCBiW25dOwoJZm9yKGludCBpID0gMDsgaSA8IG47IGkrKykKCXsKCQlmb3IoaW50IGogPSAwOyBqIDwgbjsgaisrKQoJCXsKCQkJY2luID4+IHpbaV1bal07CgkJfQoJfQoJZm9yIChpbnQgaSA9IDA7IGkgPCBuOyBpKyspCgl7CgkJYltpXSA9IDA7CgkJZm9yKGludCBqID0gMDsgaiA8IG47IGorKykKCQkJaWYoeltpXVtqXSA8IDApCgkJCXsKCQkJCWJbaV0gPSAxOwoJCQkJYnJlYWs7CgkJCX0KCX0KCWZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKQoJewoJCWNvdXQgPDwgYltpXSA8PCAiICI7Cgl9CglyZXR1cm4gMDsKfQ==