#include <iostream>
using namespace std;
const int n = 6;
void read_matrix(int a[][n], int n);
void prnt(int a[],int n);
int main() {
int M1[n][n];
int M2[n][n];
int result[n];
read_matrix(M1,n);
read_matrix(M2,n);
for(int i = 0; i < n; i++) {
result[i] = 1;
for(int j = 0; j < n; j++){
if( !(M1[i][j] > M2[i][j]) ) {
result[i] = 0;
break;
}
}
}
prnt(result,n);
return 0;
}
void read_matrix(int a[][n], int n) {
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> a[i][j];
}
}
}
void prnt(int a[], int n) {
for (int i = 0; i < n; i++) {
cout << a[i] << " ";
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgaW50IG4gPSA2Owp2b2lkIHJlYWRfbWF0cml4KGludCBhW11bbl0sIGludCBuKTsKdm9pZCBwcm50KGludCBhW10saW50IG4pOwogCmludCBtYWluKCkgewoJCgkgaW50IE0xW25dW25dOwoJIGludCBNMltuXVtuXTsKCSBpbnQgcmVzdWx0W25dOwoJIAoJIHJlYWRfbWF0cml4KE0xLG4pOwoJIHJlYWRfbWF0cml4KE0yLG4pOwoJIAoJIGZvcihpbnQgaSA9IDA7IGkgPCBuOyBpKyspIHsKCQlyZXN1bHRbaV0gPSAxOwoJCWZvcihpbnQgaiA9IDA7IGogPCBuOyBqKyspewoJCSAgICBpZiggIShNMVtpXVtqXSA+IE0yW2ldW2pdKSApIHsKCQkgICAgICAgIHJlc3VsdFtpXSA9IDA7CgkJICAgICAgICBicmVhazsKCQkgICAgfQoJCX0KCSB9CgkgCgkgcHJudChyZXN1bHQsbik7CiAKIHJldHVybiAwOwp9CiAKdm9pZCByZWFkX21hdHJpeChpbnQgYVtdW25dLCBpbnQgbikgewoJIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKSB7CgkJICBmb3IgKGludCBqID0gMDsgaiA8IG47IGorKykgewoJCQkgICBjaW4gPj4gYVtpXVtqXTsKCQkgIH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