#include <bits/stdc++.h> using namespace std; int a[105][105], b[105][105]; int main() { int m, n; cin >> m >> n;
for (int i = 1; i <= m; i++) {
for (int j = 1; j <= n; j++) {
cin >> a[i][j];
}
}
for (int i = 1; i <= m; i++) {
for (int j = 1; j <= n; j++) {
cin >> b[i][j];
}
}
for (int i = 1; i <= m; i++) {
for (int j = 1; j <= n; j++) {
if (a[i][j] == 0 && b[i][j] == 0)
cout << 0 << ' ';
else
cout << 1 << ' ';
}
cout << endl;
}
return 0;
}//有错