#define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(v) v.begin(), v.end() typedef long long ll; #include using namespace std; const int MOD=1e9+7; int main(){ ll n,m,k; cin>>n>>m>>k; vector A(n),B(m); rep(i,n) cin>>A[i]; rep(i,m) cin>>B[i]; vector S(n+1,0),T(m+1,0); rep(i,n) S[i+1]=S[i]^A[i]; rep(i,m) T[i+1]=T[i]^B[i]; vector C(1024),D(1024); for(int i=1;i<=n;i++){ for(int j=0;j